{"id":22903104,"url":"https://github.com/space-physics/pyzenodo3","last_synced_at":"2025-05-08T16:54:34.150Z","repository":{"id":47810476,"uuid":"138543765","full_name":"space-physics/pyzenodo3","owner":"space-physics","description":"Simple, clean pure Python 3 Zenodo API (upload, download). ","archived":false,"fork":false,"pushed_at":"2023-07-27T19:06:06.000Z","size":50,"stargazers_count":35,"open_issues_count":7,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T03:09:47.855Z","etag":null,"topics":["json","zenodo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/space-physics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["scivision"],"ko_fi":"scivision"}},"created_at":"2018-06-25T04:32:28.000Z","updated_at":"2023-10-14T22:10:58.000Z","dependencies_parsed_at":"2022-09-10T04:04:05.179Z","dependency_job_id":"78331e94-9f8c-48f5-9e66-75a1723fd96a","html_url":"https://github.com/space-physics/pyzenodo3","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.12903225806451613","last_synced_commit":"09bdb3f9f0ac9961f74220a21ca6d4fd666e198a"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fpyzenodo3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fpyzenodo3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fpyzenodo3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fpyzenodo3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-physics","download_url":"https://codeload.github.com/space-physics/pyzenodo3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253111100,"owners_count":21856064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","zenodo"],"created_at":"2024-12-14T02:33:40.827Z","updated_at":"2025-05-08T16:54:34.120Z","avatar_url":"https://github.com/space-physics.png","language":"Python","funding_links":["https://github.com/sponsors/scivision","https://ko-fi.com/scivision"],"categories":[],"sub_categories":[],"readme":"# PyZenodo\n\n[![DOI](https://zenodo.org/badge/138543765.svg)](https://zenodo.org/badge/latestdoi/138543765)\n![Actions Status](https://github.com/space-physics/pyzenodo3/workflows/ci/badge.svg)\n[![pypi versions](https://img.shields.io/pypi/pyversions/pyzenodo3.svg)](https://pypi.python.org/pypi/pyzenodo3)\n[![PyPi Download stats](http://pepy.tech/badge/pyzenodo3)](http://pepy.tech/project/pyzenodo3)\n\nPure Python wrapper for [Zenodo REST API](http://developers.zenodo.org/).\n\nAllows upload / download of data from Zenodo.\n\n## Install\n\n```sh\npip install pyzenodo3\n```\n\nLatest development\n\n```sh\ngit clone https://github.com/scivision/pyzenodo3\n\npip install -e pyzenodo3\n```\n\n## Usage\n\nHere are several examples of using Zenodo from Python 3.\nAll of them assume you have first:\n\n```python\nimport pyzenodo3\n\nzen = pyzenodo3.Zenodo()\n```\n\n### Upload file to Zenodo\n\n0. Get a Zenodo `deposit:write` [API Token](https://zenodo.org/account/settings/applications/tokens/new/).\n   This token must remain private, NOT uploaded to GitHub, etc.!\n1. create a simple text file `mymeta.ini` containing title, author etc. (see the example `meta.ini` in this repo)\n2. upload file to Zenodo  (myApiToken is the cut-n-pasted Zenodo API text token)\n\n   ```sh\n   python pyzenodo3.upload myApiToken mymeta.ini myfile.zip --use-sandbox\n   ```\n\nNote the `--use-sandbox` is to avoid making junk uploads while testing out.\nOnce you're sure things are working as intended, not using that flag uploads to \"real\" Zenodo permanently.\n\n\n### Find Zenodo record by Github repo\n\n```python\nRec = zen.find_record__by_github_repo('scivision/lowtran')\n```\nThis 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.\n\n### Find Zenodo records by Github username\n\n```python\nRecs = zen.search('scivision')\n```\nRecs is a `list` of Zenodo Records for the GitHub username queried, as in the example above.\n\n## Notes\n\n* We don't use `deposit:publish` API token to keep a human-in-the-loop in case of hacking of sensor nodes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-physics%2Fpyzenodo3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-physics%2Fpyzenodo3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-physics%2Fpyzenodo3/lists"}