Skip to main content

oarepo-related-resources

A library for retrieving metadata from persistent identifiers (DOI/Handle) in Invenio/OARepo applications.

What It Does

  • detects whether a persistent identifier is supported,
  • uses resolvers to fetch metadata (title, creators, publication_date, resource_type, ...),
  • returns a normalized internal ID (doi/..., handle/...) and metadata,
  • provides an ORCID importer (current_orcid_importer).

Installation

Add oarepo-related-resources as a dependency in your project.

For local development (editable):

[tool.uv.sources]
oarepo-related-resources = { path = "/path/to/oarepo-related-resources", editable = true }

Registering the Extension

In your application's pyproject.toml:

[project.entry-points."invenio_base.api_apps"]
related_resources_import_extension = "oarepo_related_resources.ext:RelatedResourcesImportExtension"

[project.entry-points."invenio_base.apps"]
related_resources_import_extension = "oarepo_related_resources.ext:RelatedResourcesImportExtension"

Configuration

Default configuration is provided by oarepo_related_resources.config.

Most important keys:

  • PERSISTENT_IDENTIFIER_RESOLVERS
  • PERSISTENT_IDENTIFIER_PATTERNS
  • DATACITE_URL
  • CROSSREF_URL
  • HANDLE_URL
  • ORCID_PUBLIC_DUMP_S3_BUCKET_NAME
  • ORCID_AWS_ACCESS_KEY_ID
  • ORCID_AWS_SECRET_ACCESS_KEY

Usage in Code

1) Resolver registry (DOI/Handle -> metadata)

from oarepo_related_resources.proxies import current_resolver_registry

record_data, problems = current_resolver_registry.resolve("https://doi.org/10.1234/abcd")

# record_data:
# {
#   "id": "doi/10.1234/abcd",
#   "metadata": {
#       "title": "...",
#       "creators": [...],
#       "publication_date": "...",
#       "resource_type": {"id": "..."},
#       "persistent_url": "https://doi.org/10.1234/abcd"
#   }
# }

2) ORCID importer

from oarepo_related_resources.proxies import current_orcid_importer

person = current_orcid_importer.resolve("0000-0001-2345-6789", vocabulary="names")

Download files

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

Source Distribution

oarepo_related_resources-4.2.0.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

oarepo_related_resources-4.2.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

5.0.0

2 files

4.4.0

2 files

4.3.0

2 files

This release

4.2.0 This release

2 files

4.1.0

2 files

4.0.0

2 files

3.1.0

2 files

3.0.0

2 files

2.0.0

2 files

1.0.0

2 files

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