python-re3data

The Pythonic client for the re3data API.

https://github.com/afuetterer/python-re3data

Science Score: 67.0%

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

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary

Keywords

api api-client metadata python re3data research-data research-data-management research-data-repository
Last synced: 6 months ago · JSON representation ·

Repository

The Pythonic client for the re3data API.

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 12
  • Releases: 10
Topics
api api-client metadata python re3data research-data research-data-management research-data-repository
Created almost 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Codeowners Security

README.md

python-re3data: The Pythonic client for the re3data API.

⚠️ Please note that this project is currently under active development. As such, it is considered a work in progress, and breaking changes may be introduced at any time. We encourage users to frequently check back for updates and to exercise caution when using this project in production environments. Contributions and feedback are welcome to help move the project towards a more stable release (v1.0.0).

| CI | pre-commit.ci status ci coverage codeql | | :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Package | pypi-status pypi-version pypi-python-versions all-downloads monthly-downloads | | Meta | doi OpenSSF Scorecard uv ruff mypy License |

python-re3data is a Python library that simplifies interacting with the re3data (Registry of Research Data Repositories) REST API, allowing you to easily retrieve and process metadata about research data repositories in a convenient and Pythonic way.

```pycon

import re3data response = re3data.repositories.list() response [RepositorySummary(id='r3d100010468', doi='https://doi.org/10.17616/R3QP53', name='Zenodo', link=Link(href='https://www.re3data.org/api/beta/repository/r3d100010468', rel='self'))] ... (remaining repositories truncated) ```

```pycon

response = re3data.repositories.get("r3d100010468") response Repository(re3dataorgidentifier='r3d100010468', repositoryname=RepositoryName(value='Zenodo', language=), additionalname=[], repositoryurl='https://zenodo.org/', repositoryidentifier=['FAIRsharingdoi:10.25504/FAIRsharing.wy4egf', 'RRID:SCR004129', 'RRID:nlx_158614']) ... (remaining fields truncated) ```

Features

  • Pythonic API interactions: Interact with the re3data API in a Pythonic way, without having to worry about low-level HTTP requests or XML parsing.
  • Repository metadata retrieval: Easily fetch and process metadata about research data repositories using re3data.repositories.list().
  • Repository details retrieval: Get detailed information about a specific repository using re3data.repositories.get(repository_id).
  • XML response parsers: API XML responses are parsed into Python dataclasses, providing convenient access to the elements of the re3data.org Schema 2.2 XML Schema. This makes it easy to work with the rich metadata provided by the API.
  • Flexible response options: The response type can be switched between:
    • dataclass (default): Returns a Python dataclass object, allowing convenient access to the element of the re3data schema
    • response: Returns a Python object representing the API response
    • original XML (str): Returns the raw XML response from the API
    • JSON (str): Returns a JSON representation of the API response
    • dictionary: Returns a dictionary representation of the API response
    • csv (str): Returns a CSV representation of the API response
    • dataframe: Returns a pandas.DataFrame representation of the API response

Requirements

Python >= 3.10

python-re3data is built with:

  • HTTP Requests: httpx, a modern and efficient HTTP client library, handles all API interactions.
  • XML Parsing: xsdata, a powerful tool for generating Python dataclasses from XML schemas, simplifies processing of API responses.
  • Optional CLI: typer, a popular library for building command-line interfaces, powers the user-friendly interface.
  • Optional DataFrame/CSV: pandas, a powerful and flexible data analysis library, enables generation of DataFrames and CSV files from parsed XML responses.

Installation

You can install python-re3data via pip from PyPI:

console python -m pip install python-re3data

or pull the Docker image from GHCR:

console docker pull ghcr.io/afuetterer/python-re3data:latest

For a more detailed guide, see Installation.

Documentation

The documentation is made with Material for MkDocs and is hosted by GitHub Pages.

Similar Projects

There are a couple of similar projects available on GitHub, e.g. via the topic re3data. Among them are these implementations in Python:

| Project | Description | Last commit | | ---------------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | | py3data | py3data is a lightweight and thin Python interface to the beta version of the API. | last-commit |

License

python-re3data is distributed under the terms of the MIT License.

Owner

  • Name: Heinz-Alexander Fuetterer
  • Login: afuetterer
  • Kind: user
  • Location: Berlin, Germany
  • Company: Freie Universität Berlin

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use python-re3data, please cite it as below."
type: software
authors:
- family-names: Fütterer
  given-names: Heinz-Alexander
  orcid: https://orcid.org/0000-0003-4397-027X
title: python-re3data
license: MIT
license-url: https://github.com/afuetterer/python-re3data/blob/main/LICENSE
repository-code: https://github.com/afuetterer/python-re3data
keywords:
- api
- api-client
- metadata
- re3data
- repositories
- research data
identifiers:
- description: This is the collection of archived snapshots of all versions of python-re3data
  type: doi
  value: 10.5281/zenodo.11264510
version: 0.10.0
date-released: 2024-12-11

GitHub Events

Total
  • Create event: 65
  • Release event: 1
  • Issues event: 97
  • Watch event: 2
  • Delete event: 64
  • Issue comment event: 77
  • Push event: 99
  • Pull request review event: 1
  • Pull request event: 136
Last Year
  • Create event: 65
  • Release event: 1
  • Issues event: 97
  • Watch event: 2
  • Delete event: 64
  • Issue comment event: 77
  • Push event: 99
  • Pull request review event: 1
  • Pull request event: 136

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 107
  • Total pull requests: 129
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 5 days
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.18
  • Merged pull requests: 86
  • Bot issues: 1
  • Bot pull requests: 45
Past Year
  • Issues: 28
  • Pull requests: 42
  • Average time to close issues: 2 months
  • Average time to close pull requests: 12 days
  • Issue authors: 2
  • Pull request authors: 4
  • Average comments per issue: 0.46
  • Average comments per pull request: 0.31
  • Merged pull requests: 23
  • Bot issues: 1
  • Bot pull requests: 23
Top Authors
Issue Authors
  • afuetterer (132)
  • dependabot[bot] (1)
  • pre-commit-ci[bot] (1)
Pull Request Authors
  • afuetterer (125)
  • dependabot[bot] (52)
  • github-actions[bot] (11)
  • pre-commit-ci[bot] (7)
Top Labels
Issue Labels
type: docs (35) type: ci (22) status: abandoned (17) type: build (16) type: feature (16) type: chore (10) type: test (4) deps: pre-commit (4) type: bug (2) priority: low (2) deps: github-actions (2) deps: python (2) duplicate (2) wontfix (1) type: breaking (1) type: refactor (1) deps: docker (1) type: style (1)
Pull Request Labels
type: build (58) type: ci (53) deps: python (29) type: docs (28) deps: github-actions (24) type: feature (20) deps: docker (14) type: chore (14) deps: pre-commit (6) type: test (6) type: refactor (3) type: style (2) type: breaking (2) type: performance (1) type: bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 67 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 10
  • Total maintainers: 1
pypi.org: python-re3data

The Pythonic client for the re3data API.

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 67 Last month
Rankings
Dependent packages count: 10.9%
Average: 36.3%
Dependent repos count: 61.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements/docs.txt pypi
  • anyio ==4.3.0
  • babel ==2.15.0
  • bracex ==2.4
  • certifi ==2024.2.2
  • charset-normalizer ==3.3.2
  • click ==8.1.7
  • colorama ==0.4.6
  • csscompressor ==0.9.5
  • ghp-import ==2.1.0
  • griffe ==0.45.1
  • h11 ==0.14.0
  • htmlmin2 ==0.1.13
  • httpcore ==1.0.5
  • httpx ==0.27.0
  • idna ==3.7
  • importlib-metadata ==7.1.0
  • importlib-resources ==6.4.0
  • jinja2 ==3.1.4
  • jsmin ==3.0.1
  • markdown ==3.6
  • markdown-it-py ==3.0.0
  • markupsafe ==2.1.5
  • mdurl ==0.1.2
  • mergedeep ==1.3.4
  • mike ==2.1.1
  • mkdocs ==1.6.0
  • mkdocs-autorefs ==1.0.1
  • mkdocs-get-deps ==0.2.0
  • mkdocs-include-markdown-plugin ==6.0.6
  • mkdocs-material ==9.5.24
  • mkdocs-material-extensions ==1.3.1
  • mkdocs-minify-plugin ==0.8.0
  • mkdocstrings ==0.25.1
  • mkdocstrings-python ==1.10.3
  • packaging ==24.0
  • paginate ==0.5.6
  • pathspec ==0.12.1
  • platformdirs ==4.2.2
  • pygments ==2.18.0
  • pymdown-extensions ==10.8.1
  • pyparsing ==3.1.2
  • python-dateutil ==2.9.0.post0
  • pyyaml ==6.0.1
  • pyyaml-env-tag ==0.1
  • regex ==2024.5.15
  • requests ==2.32.2
  • rich ==13.7.1
  • shellingham ==1.5.4
  • six ==1.16.0
  • sniffio ==1.3.1
  • typer ==0.12.3
  • typing-extensions ==4.11.0
  • urllib3 ==2.2.1
  • verspec ==0.1.0
  • watchdog ==4.0.0
  • wcmatch ==8.5.2
  • zipp ==3.18.2
Dockerfile docker
  • base latest build
  • python 3.12-slim build
.github/workflows/codeql.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • github/codeql-action/analyze b7cec7526559c32f1616476ff32d17ba4c59b2d6 composite
  • github/codeql-action/init b7cec7526559c32f1616476ff32d17ba4c59b2d6 composite
.github/workflows/docs.yml actions
  • actions/cache 0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
.github/workflows/label.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • crazy-max/ghaction-github-labeler de749cf181958193cb7debf1a9c5bb28922f3e1b composite
.github/workflows/main.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
.github/workflows/pr.yml actions
  • re-actors/alls-green 05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe composite
.github/workflows/publish.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
  • pypa/gh-action-pypi-publish 81e9d935c883d0b210363ab89cf05f3894778450 composite
.github/workflows/scorecards.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • github/codeql-action/upload-sarif b7cec7526559c32f1616476ff32d17ba4c59b2d6 composite
  • ossf/scorecard-action dc50aa9510b46c811795eb24b2f1ba02a914e534 composite
.github/workflows/stale.yml actions
  • actions/stale 28ca1036281a5e5922ead5184a1bbf96e5fc984e composite
.github/workflows/test.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
  • hynek/build-and-inspect-python-package 4aea7de65ba374f49b5f549cd471b61de2ef19d3 composite
  • schneegans/dynamic-badges-action e9a478b16159b4d31420099ba146cdc50f134483 composite
.github/workflows/upgrade-requirements.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • peter-evans/create-pull-request 6d6857d36972b65feb161a90e484f2984215f83e composite
.github/requirements/ci.in pypi
  • build *
  • hatch *
  • pip *
  • pipdeptree *
  • uv *
.github/requirements/ci.txt pypi
  • anyio ==4.3.0
  • backports-tarfile ==1.1.1
  • build ==1.2.1
  • certifi ==2024.2.2
  • cffi ==1.16.0
  • click ==8.1.7
  • cryptography ==42.0.7
  • distlib ==0.3.8
  • exceptiongroup ==1.2.1
  • filelock ==3.14.0
  • h11 ==0.14.0
  • hatch ==1.11.0
  • hatchling ==1.24.2
  • httpcore ==1.0.5
  • httpx ==0.27.0
  • hyperlink ==21.0.0
  • idna ==3.7
  • importlib-metadata ==7.1.0
  • jaraco-classes ==3.4.0
  • jaraco-context ==5.3.0
  • jaraco-functools ==4.0.1
  • jeepney ==0.8.0
  • keyring ==25.2.1
  • markdown-it-py ==3.0.0
  • mdurl ==0.1.2
  • more-itertools ==10.2.0
  • packaging ==24.0
  • pathspec ==0.12.1
  • pexpect ==4.9.0
  • pip ==24.0
  • pipdeptree ==2.20.0
  • platformdirs ==4.2.2
  • pluggy ==1.5.0
  • ptyprocess ==0.7.0
  • pycparser ==2.22
  • pygments ==2.18.0
  • pyproject-hooks ==1.1.0
  • rich ==13.7.1
  • secretstorage ==3.3.3
  • shellingham ==1.5.4
  • sniffio ==1.3.1
  • tomli ==2.0.1
  • tomli-w ==1.0.0
  • tomlkit ==0.12.5
  • trove-classifiers ==2024.5.17
  • typing-extensions ==4.11.0
  • userpath ==1.9.2
  • uv ==0.1.44
  • virtualenv ==20.26.2
  • zipp ==3.18.2
  • zstandard ==0.22.0
pyproject.toml pypi
  • httpx >=0.27