zenodopy

Manage Zenodo projects with Python

https://github.com/lgloege/zenodopy

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Manage Zenodo projects with Python

Basic Info
  • Host: GitHub
  • Owner: lgloege
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 46.9 KB
Statistics
  • Stars: 18
  • Watchers: 1
  • Forks: 8
  • Open Issues: 6
  • Releases: 3
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Zenodo

README.md

zenodopy

Tests codecov pypi License:MIT contributions welcome

Project under active deveopment, not production ready

A Python 3.6+ package to manage Zenodo repositories.

Functions Implemented

  • .create_project(): create a new project
  • .upload_file(): upload file to project
  • .download_file(): download a file from a project
  • .delete_file(): permanently removes a file from a project
  • .get_urls_from_doi(): returns the files urls for a given doi

Installing

PyPi

sh pip install zenodopy==0.3.0

GitHub

sh pip install -e git+https://github.com/lgloege/zenodopy.git#egg=zenodopy

Using the Package

  1. Create a Zenodo access token by first logging into your account and clicking on your username in the top right corner. Navigate to "Applications" and then "+new token" under "Personal access tokens". Keep this window open while you proceed to step 2 because the token is only displayed once. Note that Sandbox.zenodo is used for testing and zenodo for production. If you want to use both, create for each a token as desribed above.
  2. Store the token in ~/.zenodo_token using the following command.

```sh

zenodo token

{ echo 'ACCESSTOKEN: youraccesstokenhere' } > ~/.zenodo_token

sandbox.zenodo token

{ echo 'ACCESSTOKEN-sandbox: youraccesstokenhere' } > ~/.zenodo_token ```

  1. start using the zenodopy package

```python import zenodopy

always start by creating a Client object

zeno = zenodopy.Client(sandbox=True)

list project id's associated to zenodo account

zeno.list_projects

create a project

zeno.createproject(title="testproject", upload_type="other")

your zeno object now points to this newly created project

create a file to upload

with open("~/test_file.txt", "w+") as f: f.write("Hello from zenodopy")

upload file to zenodo

zeno.upload_file("~/test.file.txt")

list files of project

zeno.list_files

set project to other project id's

zeno.set_project("")

delete project

zeno.deleteproject(dep_id="") ```

Notes

This project is under active development. Here is a list of things that needs improvement:

  • more tests: need to test uploading and downloading files
  • documentation: need to setup a readthedocs
  • download based on DOI: right now you can only download from your own projects. Would be nice to download from
  • asyncronous functions: use asyncio and aiohttp to write async functions. This will speed up downloading multiple files.

Owner

  • Name: Luke Gloege
  • Login: lgloege
  • Kind: user
  • Location: New York, NY
  • Company: Open Earth Foundation

Climate Data Engineer @Open-Earth-Foundation

GitHub Events

Total
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 1
  • Pull request event: 8
Last Year
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 1
  • Pull request event: 8

Issues and Pull Requests

Last synced: almost 2 years ago

All Time
  • Total issues: 8
  • Total pull requests: 6
  • Average time to close issues: 18 days
  • Average time to close pull requests: 20 days
  • Total issue authors: 5
  • Total pull request authors: 2
  • Average comments per issue: 0.88
  • Average comments per pull request: 0.17
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • lgloege (4)
  • tsitsvero (1)
  • fxcoudert (1)
  • ElpadoCan (1)
  • bw4sz (1)
Pull Request Authors
  • drifter089 (5)
  • pz-max (4)
  • longavailable (1)
  • man74cio (1)
Top Labels
Issue Labels
enhancement (1) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 36 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 4
  • Total maintainers: 1
pypi.org: zenodopy

manage zenodo project

  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 36 Last month
Rankings
Dependent packages count: 4.8%
Forks count: 14.3%
Stargazers count: 15.6%
Average: 17.8%
Dependent repos count: 21.6%
Downloads: 32.6%
Maintainers (1)
Last synced: 10 months ago

Dependencies

requirements.txt pypi
  • requests ==2.26.0
  • types-requests ==2.27.7
  • wget ==3.2
requirements_dev.txt pypi
  • flake8 ==3.9.2 development
  • mypy ==0.910 development
  • pytest ==6.2.5 development
  • pytest-cov ==2.12.1 development
  • requests ==2.26.0 development
  • tox ==3.24.3 development
  • types-requests ==2.27.7 development
  • wget ==3.2 development
.github/workflows/tests.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v5 composite
.github/workflows/version_update.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v5 composite
pyproject.toml pypi
setup.py pypi