pyDataverse¶
Release v0.2.1.
pyDataverse is a Python module for Dataverse. It uses the Dataverse API and it’s metadata data model to import, manipulate and export Dataverses, Datasets and Datafiles.
Quickstart¶
Install
pip install pyDataverse
Usage
>>> from pyDataverse.api import Api
>>> from pyDataverse.models import Dataverse
>>> # establish connection
>>> base_url = 'https://data.aussda.at/'
>>> api = Api(base_url)
>>> api.status
'OK'
>>> # get dataverse
>>> dv = 'autnes' # dataverse alias or id
>>> resp = api.get_dataverse(dv)
>>> resp.json()['data']['creationDate']
'2017-11-09T13:53:27Z'
>>> # get dataset
>>> identifier = 'doi:10.11587/IMKDZI'
>>> resp = api.get_dataset(identifier)
>>> resp.json()['data']['id']
345
>>> # get datafile
>>> datafile_id = '399' # file id of the datafile
>>> resp = api.get_datafile(datafile_id)
>>> resp
<Response [200]>
Features¶
- Dataverse Api functionalities to create, get, publish and delete Dataverses, Datasets and Datafiles of your Dataverse instance via Api.
- Dataverse metadata model for easy manipulation and data conversion from and to other formats (e. g. Dataverse Api metadata JSON).
- Utils to support core functionalities.
- Custom exceptions.
- Tests on Travis CI (pytest + tox).
- Open Source (MIT)
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.