Skip to main content

"A Python client for DataCite MDS and REST APIs."

Project description

https://github.com/inveniosoftware/datacite/actions/workflows/tests.yml/badge.svg https://img.shields.io/coveralls/inveniosoftware/datacite.svg https://img.shields.io/pypi/v/datacite.svg?maxAge=2592000 https://pepy.tech/badge/datacite?maxAge=2592000 https://img.shields.io/pypi/l/datacite.svg https://img.shields.io/github/tag/inveniosoftware/datacite.svg

About

Python API wrapper for the DataCite REST and Metadata Store APIs as well as DataCite JSON and XML generation.

Installation

The datacite package is on PyPI so all you need is:

pip install datacite

Documentation

Documentation is readable at http://datacite.readthedocs.io/ or can be built using Sphinx:

pip install datacite[docs]
python setup.py build_sphinx

Testing

Running the test suite is as simple as:

pip install -e .[all]
./run-tests.sh

If you’re using zsh, use this pip command instead:

pip install -e .’[all]’

Some tests require a DataCite Test Account. Set the following environment variables $DATACITE_USER, $DATACITE_PW, $DATACITE_PREFIX with your account information for doi.test.datacite.org and run:

./run-tests-pw.sh

Changes

Version v1.4.0 (released 2026-03-19)

  • fix: DeprecationWarning

  • chore: black formatting

  • build(deps): bump pypa/gh-action-pypi-publish in /.github/workflows

Version v1.3.1 (released 2025-07-23):

  • remove deprecated schema 31 test files

  • tests: reorganize test files and remove http schema access that was removed in lxml

  • fix: replaced pkg_resources with importlib.resources

Version v1.3.0 (released 2025-07-03):

  • Removes deprecated schema 3.1

  • Adds minimum python version 3.9

  • Switches 4.5 schema to https

  • Documentation clanup and improvements

Version v1.2.0 (released 2024-10-17):

  • Updates package setup and adds black formatting

  • Adds support for DataCite Metadata Schema v4.5. The version 4.5 jsonschema includes a number of changes and improvements:

    • Switches to jsonschema 2019-09 and adds more complete validation to catch mistyped elements

    • Switches publisher from a string to an object. This means you will need to change publisher to be structured like “publisher”: {“name”: “Invenio Software”} when you use version 4.5. This change is needed to support the addition of publisher identifiers.

    • Removes the identifiers field and added doi, prefix, and suffix fields. These fields are clearer, and DataCite appears to be moving away from the combined identifiers field. doi is not a required field since you may or may not have a DOI depending on your workflow.

    • Adds new relatedItem elements for publication metadata

    • Switches geolocation point values to numbers. This is to enable validation and is consistent with GeoJson and InvenioRDM. It is different from the DataCite REST API which uses strings, and submitted numbers will be turned into strings by DataCite.

    • Reorganizes geolocationPolygon to how DataCite is currently rendering this metadata

    • Adds support for the new resourceTypeGeneral and relationType values

    • General jsonschema organization improvements

Version v1.1.3 (released 2023-03-20):

  • Updates dependency versions and adds python 3.9 support

  • Changes internal definition name for affiliation in 4.3 schema

Version v1.1.2 (released 2021-06-22):

  • Standardizes function names in DataCiteRESTClient. Old functions will be depreciated in a future release

Version v1.1.1 (released 2021-04-20):

  • Fixes DataCiteRESTClient attributes’ type. Prefix, username and password are always cast to string.

Version v1.1.0 (released 2021-04-15):

  • Adds full support for DataCite Metadata Schema v4.2 and v4.3 XML generation.

  • Uses Official DataCite JSON Schema, which has the following notable changes from the previous schema:

    • Uses “identifiers” which is a combination of the XML “identifier” and “alternativeIdentifiers” elements

    • “creatorName” is now “name”

    • “contributorName” is now “name”

    • “affiliations” is now “affiliation” (is still an array)

    • “affilition” is now “name”

    • There is no longer a funder identifier object (the identifier and type are just elements)

  • Removes Python 2 support

  • Removes the old way of testing with DataCite: test mode for the MDS APIs and the test DOI 10.5072

Version v1.0.1 (released 2018-03-08):

  • Fixes schema location url for DataCite v4.1

Version v1.0.0 (released 2018-02-28):

  • Adds full support for DataCite Metadata Schema v4.1 XML generation.

Version v0.3.0 (released 2016-11-18):

  • Adds full support for DataCite Metadata Schema v4.0 XML generation.

  • Adds the message from the server in the error exceptions.

Version v0.2.2 (released 2016-09-23):

  • Fixes issue with generated order of nameIdentifier and affiliation tags.

Version v0.2.1 (released 2016-03-29):

  • Fixes issue with JSON schemas not being included when installing from PyPI.

Version v0.2.0 (released 2016-03-21):

  • Adds DataCite XML generation support.

Version 0.1 (released 2015-02-25):

  • Initial public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datacite-1.4.0.tar.gz (148.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datacite-1.4.0-py2.py3-none-any.whl (45.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file datacite-1.4.0.tar.gz.

File metadata

  • Download URL: datacite-1.4.0.tar.gz
  • Upload date:
  • Size: 148.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datacite-1.4.0.tar.gz
Algorithm Hash digest
SHA256 f7f55fe27a64ac64a4fbee49372007e966871a456c38497ccb2cc856c611679a
MD5 9cf8a1de49d8ba713736adcfc712b35f
BLAKE2b-256 d066c5c0dcf6462087e40f593e1b153990655168698be8be2ddb36a1dbb1df9d

See more details on using hashes here.

File details

Details for the file datacite-1.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: datacite-1.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datacite-1.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ecc920578ec8c504b5a35d406ac3b1e0baf0e0cb117bd2c3ab1fb2206371e089
MD5 b67954e9757000f44b4904e024eb22fe
BLAKE2b-256 155e10cc4ed24d4e84a6e7a639488e57a791f97461fea075c828ead318d4bf7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page