{"id":47230085,"url":"https://github.com/tpall/pynodo","last_synced_at":"2026-03-13T20:19:37.933Z","repository":{"id":57456215,"uuid":"231588382","full_name":"tpall/pynodo","owner":"tpall","description":"Python wrapper for Zenodo REST API","archived":false,"fork":false,"pushed_at":"2023-05-22T22:37:10.000Z","size":60,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-29T05:53:58.843Z","etag":null,"topics":["python","wrapper-api","zenodo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-03T12:52:48.000Z","updated_at":"2025-05-12T00:05:59.000Z","dependencies_parsed_at":"2023-07-15T16:08:49.762Z","dependency_job_id":null,"html_url":"https://github.com/tpall/pynodo","commit_stats":null,"previous_names":["tpall/zenapi"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tpall/pynodo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpall%2Fpynodo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpall%2Fpynodo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpall%2Fpynodo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpall%2Fpynodo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpall","download_url":"https://codeload.github.com/tpall/pynodo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpall%2Fpynodo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30474599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["python","wrapper-api","zenodo"],"created_at":"2026-03-13T20:19:35.991Z","updated_at":"2026-03-13T20:19:37.903Z","avatar_url":"https://github.com/tpall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![](https://github.com/tpall/pynodo/workflows/CI/badge.svg)[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=tpall_zenapi\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=tpall_zenapi)[![DOI](https://zenodo.org/badge/231588382.svg)](https://zenodo.org/badge/latestdoi/231588382)\n\n# Pynodo -- manage your Zenodo depositions\n\nPython wrapper for Zenodo REST API for working with Zenodo depositions and files.\n\n## Installation\n\n```python\npip install pynodo\n```\n\n## Usage\n\n[Zenodo](https://zenodo.org) access token with write scope is necessary to access depositions and files.\nSeparate token is neccessary for [zenodo sandbox](https://sandbox.zenodo.org) environment.\nSandbox can be switched by setting `sandbox=True` when initiating *pynodo* instance.\n\n- Depositions can be accessed using *pynodo.Depositions* class. \n\n- Files in a deposition can be accessed using *pynodo.DepositionFiles* class.\n\n- *Depositions.create* and *DepositionFiles.files* return namedtuple and list of namedtuples, respectively.\nOther functions return either json response or status code (delete).\n\n- Actions (e.g. publish, new version, edit) are not implemented.\n\n### Working with Depositions\n\npynodo allows listing, creating, retrieving, updating and deleting of depostions.\n\n- Create zenodo (sandbox) instance\n\n```python\nimport pynodo\nimport os\n\nzen = pynodo.Depositions(access_token=os.environ[\"ZENODO_SANDBOX_PAT\"], sandbox=True)\n```\n\n- List user depositions\n\n```python\ndepos = zen.list(params={\"size\": 50})\n```\n\n- Create a new deposition with some metadata\n\n```python\ndata = {\n    \"metadata\": {\n        \"title\": \"My first upload\",\n        \"upload_type\": \"poster\",\n        \"description\": \"This is my first upload\",\n        \"creators\": [{\"name\": \"Päll, Taavi\", \"affiliation\": \"UT\"}],\n    }\n}\nnew_depo = zen.create(data=data)\n```\n\n- Retrieve deposition info\n\n```python\nret_depo = zen.retrieve(deposition=new_depo.id)\n```\n\n- Update deposition metadata\n\n```python\nupdates = {\n    \"metadata\": {\n        \"title\": \"Modified upload\",\n        \"upload_type\": \"dataset\",\n        \"description\": \"This is updated upload\",\n        \"creators\": [\n            {\"name\": \"Päll, Taavi\", \"affiliation\": \"UT\"},\n            {\"name\": \"Sus, Scrofa\", \"affiliation\": \"Mets\"},\n        ],\n    }\n}\nupdated_depo = zen.update(deposition=new_depo.id, data=updates)\n```\n\n- Delete deposition (status code 204 shows success)\n\n```python\nzen.delete(new_depo.id)\n```\n\n### Working with DepositionFiles\n\npynodo allows listing, uploading, downloading and deleting of files in a deposition.\n\n- Create zenodo (sandbox) instance\n\n```python\nimport pynodo\nimport os\nzen = pynodo.Depositions(access_token=os.environ[\"ZENODO_SANDBOX_PAT\"], sandbox=True)\n```\n\n- Create new deposition\n\n```python\nnew_depo = zen.create()\n```\n\n- Retrive deposition\n\n```python\nret_depo = zen.retrieve(deposition=new_depo.id)\n```\n\n- Create new instance for listing files\n\n```python\nzen_files = pynodo.DepositionFiles(\n    deposition=new_depo.id,\n    access_token=os.environ[\"ZENODO_SANDBOX_PAT\"],\n    sandbox=True,\n)\n```\n\n- Upload file (second argument with new file name is optional)\n\n```python\nzen_files.upload(\"tests/upload.txt\", \"uploaded_file.txt\")\n```\n\n- List files in deposition\n\n```python\nfiles = zen_files.files\n```\n\n- Download file from deposition (second argument with download folder is optional)\n\n```python\nzen_files.download(\"uploaded_file.txt\", \"tmp\")\n```\n\n- Delete file (status code 204 shows success)\n\n```python\nzen_files.delete(\"uploaded_file.txt\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpall%2Fpynodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpall%2Fpynodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpall%2Fpynodo/lists"}