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.5.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.5.1
File Size Uploaded Provenance Actions
invenio_pidstore_extra-0.5.1.tar.gz 17.4 kB Without provenance Details for invenio_pidstore_extra-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 36.9 kB

Release files / invenio_pidstore_extra-0.5.1.tar.gz

Download URL invenio_pidstore_extra-0.5.1.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
09e03df03db76b972a373100c06977062dbbb6dc0f4bdb391f05577f30f64be1
BLAKE2b-256 checksum
How to use checksums
aaa36f62ff3db35a255babe00ee228daa3115f557e49036089e5e2187a154e1c
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.5.1-py3-none-any.whl

Download URL invenio_pidstore_extra-0.5.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b9abe9e7cd42be624df0dfa1c128258f473db7e344734cfd7b657ed82e21559
BLAKE2b-256 checksum
How to use checksums
b18d99bb13b5c639fdf44a1a2f82bac5726275d415f07d7ba8ff58e983ffc51a
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.5.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