GithubHelp home page GithubHelp logo

kasbah / pyzenodo3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from space-physics/pyzenodo3

0.0 2.0 0.0 42 KB

Simple, clean pure Python 3 Zenodo API (upload, download).

License: Apache License 2.0

Python 100.00%

pyzenodo3's Introduction

DOI

Actions Status

pypi versions PyPi Download stats

PyZenodo

Pure Python wrapper for Zenodo REST API.

Allows upload / download of data from Zenodo.

Install

python -m pip install pyzenodo3

Latest development

pip install -e pyzenodo3

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

  1. Get a Zenodo deposit:write API Token. This token must remain private, NOT uploaded to GitHub, etc.!

  2. create a simple text file mymeta.ini containing title, author etc. (see the example meta.ini in this repo)

  3. 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.

pyzenodo3's People

Contributors

scivision avatar kasbah avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.