Skip to content

Commit

Permalink
Better DOI term snippet, 3.7+ testing docs (#29)
Browse files Browse the repository at this point in the history
* Expanded examples of DOI existence checks

* Removed try-except added
  • Loading branch information
jamesbraza authored Nov 2, 2023
1 parent 817c391 commit 5bc4891
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ When searching GWAS catalog PMID is needed over DOI. You can covert one to the o

```python
def doi_term(doi: str) -> str:
"""Prepare DOI for PubMed search"""
"""Clean a DOI string by removing URL prefix."""
doi = (
doi
.replace('http://', 'https://')
Expand All @@ -283,27 +283,26 @@ result = entrez_api.search(
database='pubmed',
max_results=1
)
result.data['esearchresult']['idlist']
print(result.data['esearchresult']['idlist'])
```

> `['33834021']`
### Installation

Requires Python 3.6+. Install with:

Requires Python 3.6+ (though only 3.7+ is tested). Install with:

```bash
pip install easy-entrez
```

If you wish to enable (optional, tqdm-based) progress bars use:
If you wish to enable (optional, `tqdm`-based) progress bars use:

```bash
pip install easy-entrez[with_progress_bars]
```

If you wish to enable (optional, pandas-based) parsing utilities use:
If you wish to enable (optional, `pandas`-based) parsing utilities use:

```bash
pip install easy-entrez[with_parsing_utils]
Expand Down

0 comments on commit 5bc4891

Please sign in to comment.