Package: py3data
py3datapy3data is a Python library forre3dataregistry.
Re3data is a global registry of research data repositories that covers
research data repositories from different academic disciplines. It includes
repositories that enable permanent storage of and access to data sets to
researchers, funding bodies, publishers, and scholarly institutions. Re3data
offers an open and freeREST API. py3data
is a lightweight and thin Python interface to the beta version of this API.The following features of re3data are currently supported by py3data:Get single repositoriesFilter and query repositoriesKey featuresPipe operations- py3data can handle multiple operations in a sequence. This allows the developer to write understandable queries. For examples, seecode snippets.JSON support- Re3datadoesn't offer a JSON implementation of the REST API. py3data parses the XML REST API and offers it in Python dict-like objects.Schema fixes- The re3data Schema is slightly hard to parse in Python directly. Re3data makes is very easy to parse the API and solves the issues.Permissive license- Re3data data is CC0 licensed :raised_hands:. py3data is published under the MIT license.Installationpy3data requires Python 3.8 or later.pipinstallpy3dataGetting startedfrompy3dataimportRepositoriesGet single repositoryGet a single RepositoryRepositories()["r3d100011986"]The result is aRepositoryobject, which is very similar to a dictionary. Find the available fields with.keys().For example, get the open access status:Repositories()["r3d100011986"]["subjects"][{'subjectScheme':'DFG','subjectName':'2 Life Sciences'},{'subjectScheme':'DFG','subjectName':'202 Plant Sciences'},{'subjectScheme':'DFG','subjectName':'20202 Plant Ecology and Ecosystem Analysis'},{'subjectScheme':'DFG','subjectName':'20203 Inter-organismic Interactions of Plants'},{'subjectScheme':'DFG','subjectName':'203 Zoology'},{'subjectScheme':'DFG','subjectName':'20303 Animal Ecology, Biodiversity and Ecosystem Research'},{'subjectScheme':'DFG','subjectName':'21 Biology'},{'subjectScheme':'DFG','subjectName':'3 Natural Sciences'},{'subjectScheme':'DFG','subjectName':'313 Atmospheric Science and Oceanography'},{'subjectScheme':'DFG','subjectName':'318 Water Research'},{'subjectScheme':'DFG','subjectName':'31801 Hydrogeology, Hydrology, Limnology, Urban Water Management, Water Chemistry, Integrated Water Resources Management'},{'subjectScheme':'DFG','subjectName':'34 Geosciences (including Geography)'}]Get lists of repositoriesIt is possible to get lists of results from re3data. However keep in mind that
lists consist ofRepositoryobjects with very few metadata (id,name,doi,link).Get all repositories:Repositories().get()For lists of repositories, you can alsocountthe number of records found
instead of returning the results. This also works for search queries and
filters.Repositories().count()# 3137Filter and query recordsRe3data makes use of filters and queries. Filters can be used to slice the
structured metadata of re3data and queries can be used to search for specific
terms or phrases. Both filters and queries can be used in one request.An overview of all the filters can be found under"Beta" in the REST API
documentation. It can be hard to find the
correct values sometimes. In that case, look for values in other single
Repository requests, theMetadata Schema, or the website.(Repositories().filter(countries="CAN").filter(subjects=["2 Life Sciences","3 Natural Sciences"]).filter(pidSystems="DOI").query("University").get())which is identical to:(Repositories().filter(countries="CAN",subjects=["2 Life Sciences","3 Natural Sciences"],pidSystems="DOI",).query("University").get())Code snippetsA list of examples for the re3data.org dataset.Get repositories running Dataverse software(Repositories().filter(software="Dataverse").get())Get repositories with word "climate" and DOI identifiers(Repositories().filter(pidSystems="DOI").query("climate").get())LicenseMITContactThis library is a community contribution. The authors of this Python library aren't affliated to re3data.Feel free to reach out with questions, remarks, and suggestions. Theissue trackeris a good starting point. You can also email me atjonathandebruinos@gmail.com.