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.0

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.0
File Size Uploaded Provenance Actions
invenio_pidstore_extra-0.6.0.tar.gz 19.4 kB Without provenance Details for invenio_pidstore_extra-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 39.8 kB

Release files / invenio_pidstore_extra-0.6.0.tar.gz

Download URL invenio_pidstore_extra-0.6.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
209f52c97fc0fc6c45c2ebc6535e564142560855d91a196800193b7b03c43383
BLAKE2b-256 checksum
How to use checksums
91f63c668411b90dfae5cd173202701cc6596a82980e2f648c47baaad82e6102
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.0-py3-none-any.whl

Download URL invenio_pidstore_extra-0.6.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19fa5b975cb263f45ad1e2d5239ed9388e0662973a4a89600fb3ebde28c98872
BLAKE2b-256 checksum
How to use checksums
8a15ac0d62cf8a82a7d1a19bb2a0ad80b152462c143b66433e37f2b01e5dbe34
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.0

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