pyDOI -- Python DOI Resolver
Wrapper for the DOI system Proxy Server REST API (see also here).
Happy to receive any help in the form of bug reports, suggestions and/or pull requests! Especially, suggestions to enhance programming style (and also setup of a test suite) are highly welcome.
Usage
In [1]: import pydoi
Get full response
In [2]: pydoi.resolve("10.1002/chem.202000622")
Out[2]:
{'responseCode': 1,
'handle': '10.1002/chem.202000622',
'values': [{'index': 1,
'type': 'URL',
'data': {'format': 'string',
'value': 'https://onlinelibrary.wiley.com/doi/10.1002/chem.202000622'},
'ttl': 86400,
'timestamp': '2020-09-25T16:02:07Z'},
{'index': 700050,
'type': '700050',
'data': {'format': 'string', 'value': '2020100503563800217'},
'ttl': 86400,
'timestamp': '2020-10-05T12:25:43Z'},
{'index': 100,
'type': 'HS_ADMIN',
'data': {'format': 'admin',
'value': {'handle': '0.na/10.1002',
'index': 200,
'permissions': '111111110010'}},
'ttl': 86400,
'timestamp': '2020-03-30T02:01:43Z'}]}
Get URL
In [3]: pydoi.get_url("10.1016/j.chempr.2020.04.016")
Out[3]: 'https://linkinghub.elsevier.com/retrieve/pii/S2451929420301844'
Get single URL or list of URLs from "10320/loc" type records
In [4]: pydoi.get_url("10.6567/IFToMM.14TH.WC.OS3.029")
Out[4]: 'https://www.airitilibrary.com/Publication/alDetailedMesh?DocID=P20150909001-201510-201510260026-201510260026-672-680'
In [5]: pydoi.get_url("10.6567/IFToMM.14TH.WC.OS3.029", allow_multi=True)
Out[5]:
['http://www.airitilibrary.cn/Publication/alDetailedMesh?DocID=P20150909001-201510-201510260026-201510260026-672-680',
'https://www.airitilibrary.com/Publication/alDetailedMesh?DocID=P20150909001-201510-201510260026-201510260026-672-680']
pyDOI supports the use of query parameters
In [6]: pydoi.resolve("10.1002/anie.201804551", params=[("type", "URL")])
Out[6]:
{'responseCode': 1,
'handle': '10.1002/anie.201804551',
'values': [{'index': 1,
'type': 'URL',
'data': {'format': 'string',
'value': 'https://onlinelibrary.wiley.com/doi/abs/10.1002/anie.201804551'},
'ttl': 86400,
'timestamp': '2020-03-19T11:37:54Z'}]}
In [7]: pydoi.resolve("10.1002/anie.201804551", params=[("type", ["HS_ADMIN", "700050"])])
Out[7]:
{'responseCode': 1,
'handle': '10.1002/anie.201804551',
'values': [{'index': 700050,
'type': '700050',
'data': {'format': 'string', 'value': '2020031904142600770'},
'ttl': 86400,
'timestamp': '2020-03-19T11:37:54Z'},
{'index': 100,
'type': 'HS_ADMIN',
'data': {'format': 'admin',
'value': {'handle': '0.na/10.1002',
'index': 200,
'permissions': '111111110010'}},
'ttl': 86400,
'timestamp': '2018-05-15T11:31:52Z'}]}
Installation
Installable with pip.
pip install pyDOI
License
GNU General Public License v3.0 or later
See LICENSE for the full text.
Metadata
Release files for pyDOI 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyDOI-0.2.1.tar.gz | 20.2 kB | Without provenance | Details for pyDOI-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyDOI-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pyDOI-0.2.1-py3-none-any.whl |
Total release size: 37.1 kB
Release files / pyDOI-0.2.1.tar.gz
| Download URL | pyDOI-0.2.1.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
548e456287054fda950566b0f4774db80622822dc4b0f5d46df9975264562960
|
|
BLAKE2b-256 checksum How to use checksums |
8090c9f17d2dce7b50ebb319d010e5b55e8fd69bcad9e3b749c24a601a0fd999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / pyDOI-0.2.1-py3-none-any.whl
| Download URL | pyDOI-0.2.1-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ec5bea89a6ec12ab5cdf2731f31186371fb173913919e831bf33b064004db9e
|
|
BLAKE2b-256 checksum How to use checksums |
1fed74a65dc213e3783fc94a9f165a52a07a96b6e4bb8b018a95867525fc4fa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for pyDOI 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.