Pure Python 3 wrapper for the Zenodo REST API
Project description
PyZenodo 3
Pure Python 3 wrapper for Zenodo REST API.
Allows upload / download of data from Zenodo.
Install
python -m pip install pyzenodo3
Latest development
pip install -e .
Usage
Here are several examples of using Zenodo from Python 3. All of them assume you have first:
import pyzenodo3
zen = pyzenodo3.Zenodo()
Upload file to Zenodo
- Get a Zenodo
deposit:write
API Token. This token must remain private, NOT uploaded to GitHub, etc.! - create a simple text file
mymeta.ini
containing title, author etc. (see the examplemeta.ini
in this repo) - upload file to Zenodo (myApiToken is the cut-n-pasted Zenodo API text token)
./upload_zenodo.py myApiToken mymeta.ini myfile.zip
Find Zenodo record by Github repo
Rec = zen.find_record__by_github_repo('scivision/lowtran')
This Zenodo Record contains the metadata that can be further manipulated in a simple class containing the data in dictionaries, with a few future helper methods.
Find Zenodo records by Github username
Recs = zen.search('scivision')
Recs is a list
of Zenodo Records for the GitHub username queried, as in the example above.
Notes
- We don't use
deposit:publish
API token to keep a human-in-the-loop in case of hacking of sensor nodes.
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
pyzenodo3-0.1.1.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for pyzenodo3-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f62c5327c0e660b0137a8f107fda58727787ef2b84a04713f0f5d2891b9a12e |
|
MD5 | 5adb0b5c6d0ab482f1fed6a0ee19f0ae |
|
BLAKE2b-256 | c0a3c440a7e25dbcee26a34344f17d4b52432eda0b8e0d0f7060abfe0953a57d |