Skip to main content

invenio-pidstore-extra

Module that adds URN minting by DNB epicur service.

InvenioRDM supports DOI minting with Datacite out of the box. This module adds support for URN minting by using the URN API published by German National Library (DNB).

Configuration

After adding the module to your InvenioRDM instance you need to add the following snippet to your invenio.cfg. Make sure you have registered at the DNB and set the config variables below to the correct values!

When putting this to production, set PIDSTORE_EXTRA_TEST_MODE = False!

PIDSTORE_EXTRA_DNB_SANDBOX_URI = "http://127.0.0.1:8000/"

PIDSTORE_EXTRA_DNB_ENABLED = True
PIDSTORE_EXTRA_DNB_USERNAME = "username"
PIDSTORE_EXTRA_DNB_PASSWORD = "password"
PIDSTORE_EXTRA_DNB_ID_PREFIX = "urn:nbn:de:hbz:6"
PIDSTORE_EXTRA_FORMAT = "{prefix}-{id}"
PIDSTORE_EXTRA_TEST_MODE = True

#
# Persistent identifiers configuration
#
from invenio_rdm_records.config import RDM_PERSISTENT_IDENTIFIER_PROVIDERS as DEFAULT_PERSISTENT_IDENTIFIER_PROVIDERS
from invenio_pidstore_extra import providers

RDM_PERSISTENT_IDENTIFIER_PROVIDERS = DEFAULT_PERSISTENT_IDENTIFIER_PROVIDERS + [
    providers.DnbUrnProvider(
      "urn",
      client=providers.DNBUrnClient("dnb", PIDSTORE_EXTRA_DNB_ID_PREFIX, PIDSTORE_EXTRA_DNB_USERNAME, PIDSTORE_EXTRA_DNB_PASSWORD, PIDSTORE_EXTRA_FORMAT),
      label=_("URN"),
    ),
]

from invenio_rdm_records.config import RDM_PERSISTENT_IDENTIFIERS as DEFAULT_PERSISTENT_IDENTIFIERS

RDM_PERSISTENT_IDENTIFIERS = {
    **DEFAULT_PERSISTENT_IDENTIFIERS,
    "urn": {
      "providers": ["urn"],
      "required": True,
      "label": _("URN"),
      "is_enabled": providers.DnbUrnProvider.is_enabled,
    },
}

from invenio_pidstore_extra.services.components import URNRelationsComponent
from invenio_rdm_records.services.components import DefaultRecordsComponents

RDM_RECORDS_SERVICE_COMPONENTS = DefaultRecordsComponents + [URNRelationsComponent]

Development

The flask app invenio_pidstore_extra.dnb-sandbox.py contains a very simple implementation of the DNB api to allow testing the URN support when the DNB sandbox is not available or just no user has been provided. You can start it with calling

python invenio_pidstore_extra/dnb-sandbox.py --port 8000 --namespace urn:nbn:de:hbz:6- --namespace urn:nbn:de:test:

The –namespace option can be repeated to accept multiple namespace prefixes.

Metadata

Release files for invenio-pidstore-extra 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for invenio-pidstore-extra 0.6.1
File Size Uploaded Provenance Actions
invenio_pidstore_extra-0.6.1.tar.gz 19.9 kB Without provenance Details for invenio_pidstore_extra-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for invenio-pidstore-extra 0.6.1
File Interpreter ABI Platform Actions
invenio_pidstore_extra-0.6.1-py3-none-any.whl Python 3 none any Details for invenio_pidstore_extra-0.6.1-py3-none-any.whl

Total release size: 40.4 kB

Release files / invenio_pidstore_extra-0.6.1.tar.gz

Download URL invenio_pidstore_extra-0.6.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5000bb7352c8cb5c943c5a3a8f5703a94e0a3ce7988c9cad25beab0e6ed59a72
BLAKE2b-256 checksum
How to use checksums
ea7fed635e7e6a537e8d39461602031bf91dc00f5d7c3435d966c8c4b659bf98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / invenio_pidstore_extra-0.6.1-py3-none-any.whl

Download URL invenio_pidstore_extra-0.6.1-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bc3610677c967d800e14d03a3b051b7971a369e68addd9e5660ce23b46ed1be
BLAKE2b-256 checksum
How to use checksums
a8fd7abff1bd747a4c7950c7b13eeda0f57547391aa932c74e1b87d02ff7720e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Security for invenio-pidstore-extra 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page