pyDataverse¶
Release v0.1.1.
pyDataverse is a Python module for Dataverse. It uses the Native API and Data Access API to create, update and remove Dataverses, Datasets and Datafiles.
Quickstart¶
Install
pip install pyDataverse
Usage
>>> from pyDataverse.api import Api
>>> # establish connection
>>> base_url = 'http://demo.dataverse.org'
>>> api = Api(base_url)
>>> api.status
'OK'
>>> # get dataverse
>>> dv = 'ecastro' # dataverse alias or id
>>> resp = api.get_dataverse(dv)
>>> resp.json()['data']['creationDate']
'2015-04-20T09:29:39Z'
>>> # get dataset
>>> resp = api.get_dataset(identifier)
>>> resp.json()['data']['id']
24
>>> # get datafile
>>> datafile_id = '32' # file id of the datafile
>>> resp = api.get_datafile(datafile_id)
>>> resp
<Response [200]>
Features¶
Community Guide¶
This part of the documentation, which is mostly prose, details the pyDataverse ecosystem and community.
Developer Guide¶
If you are looking for information on a specific function, class, or method, this part of the documentation is for you.
Contributor Guide¶
In the spirit of free software, everyone is encouraged to help improve this project.
Here are some ways you can contribute:
- by reporting bugs
- by suggesting new features
- by translating to a new language
- by writing or editing documentation
- by writing code (no pull request is too small: fix typos in the user interface, add code comments, clean up inconsistent whitespace)
- by refactoring code or adding new features (please get in touch with us before you do, so we can syncronize the efforts and prevent misunderstandings)
- by closing issues
- by reviewing pull requests
When you are ready, submit a pull request.
Submitting an Issue
We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn’t already been submitted. When submitting a bug report, please try to provide a screenshot that demonstrates the problem.