programmatic access to ZENODO
Project description
zenodoclient
Python package to access the Zenodo API (REST and OAI-PMH) programmatically and from the command line.
Install
To install from pypi
pip install zenodoclient
Instructions for a development installation can be found in
CONTRIBUTING.md
.
Curating deposits
To curate deposits on Zenodo, you need an access token. Then you can use the CLI:
zenodo --access-token $YOURTOKEN ls
Accessing OAI-PMH feeds
Zenodo disseminates the metadata for communities via OAI-PMH. This metadata can be accessed programmatically from python as folows:
>>> from zenodoclient.oai import Records
>>> recs = Records('dictionaria')
>>> len(recs)
18
We can list the latest version for each Dictionaria dictionary:
>>> import itertools
>>> for d, records in itertools.groupby(sorted(recs, key=lambda r: (r.repos.repos, r.version), reverse=True), lambda r: r.repos.repos):
... print(d, next(records).tag)
...
wersing v1.0
tseltal v1.0.1
teop v1.0
sidaama v1.0
sanzhi v1.0
palula v1.0
nen v1.1
medialengua v1.0
kalamang v1.0
hdi v1.1
guarayu v1.0
diidxaza v1.0
daakaka v1.1.1
and look at metadata:
>>> recs[0].doi
'10.5281/zenodo.3066952'
>>> recs[0].citation
'Henrik Liljegren. (2019). dictionaria/palula: Palula Dictionary (Version v1.0) [Data set]. Zenodo. http://doi.org/10.5281/zenodo.3066952'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zenodoclient-0.4.1.tar.gz
(16.7 kB
view hashes)
Built Distribution
Close
Hashes for zenodoclient-0.4.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 162b60e09874f582e97b24cda3217bd4e5629c75e6f2f8e5369532a13030d1fb |
|
MD5 | 5aabcb8af990b092ae329a5a2db96290 |
|
BLAKE2b-256 | faff1aa6cc5d391dc9e5badf7844d01818f2abe4e12297847bc5e03961780857 |