A module for DOI registration
Project description
OARepo DOI
OARepo DOI adds community-specific DOI configuration to OARepo/InvenioRDM installations. It provides a DOI settings service and administration views, and extends the DataCite PID provider so DOI registration can use credentials configured for the record's default community or for the default fallback configuration.
Features
- Stores DataCite credentials per community.
- Resolves DOI credentials from a record's default community.
- Supports a default DOI settings record with
community_slugset to*, used when the record has no matching community DOI settings. - Falls back to the standard global DataCite configuration when neither community-specific nor default DOI settings exist.
- Registers DOI settings in the Invenio administration interface.
- Keeps DataCite passwords encrypted in the database.
Installation
The package is intended to be installed as part of an OARepo 14 based application.
pip install oarepo-doi
DOI Settings
Each DOI settings record connects a community, or the default fallback, to DataCite credentials:
community_slug: slug of the community using these DOI credentials, or*for default DOI settingsprefix: DataCite DOI prefixusername: DataCite usernamepassword: DataCite password, stored encrypted
Only one DOI settings record can exist for a given community slug.
Only one default DOI settings record with community_slug set to * can exist.
The service is registered under the community-doi service id and uses the
doi-settings search alias.
REST API
The DOI settings resource is exposed under:
/doi_settings
/doi_settings/<id>
The resource supports reading, updating and deleting DOI settings records. Search, create, update and delete operations are protected by the DOI settings permission policy and are available to system processes and administration users.
Example payload:
{
"community_slug": "example-community",
"prefix": "10.12345",
"username": "datacite-user",
"password": "datacite-password"
}
Default fallback settings use * as the community slug:
{
"community_slug": "*",
"prefix": "10.12345",
"username": "datacite-user",
"password": "datacite-password"
}
When a DOI settings record is created or updated, the referenced community must
exist. If the community slug cannot be found, the service returns a bad request.
The special * community slug is reserved for default DOI settings and does not
need to match an existing community.
DataCite Integration
The package provides two record-aware DataCite classes:
oarepo_doi.services.providers.client:DataCiteRecordAwareClientoarepo_doi.services.providers.provider:DataCiteRecordAwareProvider
The provider binds the current record to the DataCite client before DOI generation, registration, update, restore and delete operations. The client then looks up DOI settings for the record's default community.
When community DOI settings are found, DOI generation uses the community prefix
and the DataCite API client is created from the community username, password and
prefix. When no settings exist for the record's default community, the client
tries the default DOI settings record where community_slug is *. This default
record also applies to records without a default community.
If neither community-specific nor default DOI settings are found, the
implementation falls back to the standard InvenioRDM DataCite client and global
DATACITE_* configuration.
Configuration
The DataCite client also respects the standard global DataCite configuration
when no community-specific or * DOI settings are available, including:
DATACITE_PREFIX = "10.12345"
DATACITE_USERNAME = "user"
DATACITE_PASSWORD = "password"
DATACITE_FORMAT = "{prefix}/{id}"
DATACITE_TEST_MODE = True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oarepo_doi-6.0.0.tar.gz.
File metadata
- Download URL: oarepo_doi-6.0.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d0d2eaaa8795d0901510ba82ecdbd6030c8b10e70af456a319a0f5461bba40
|
|
| MD5 |
bd0d2324bf101366feeadfeaa84f89e1
|
|
| BLAKE2b-256 |
688f88658f200a188e0ea27c53809f5533d1e3c00e9989a8af39692c53a74898
|
File details
Details for the file oarepo_doi-6.0.0-py3-none-any.whl.
File metadata
- Download URL: oarepo_doi-6.0.0-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dd4a0c89e77d2811523c46f235e9ec04db970829a246f0a797b3d0ae98010a2
|
|
| MD5 |
4e5b38445fea9e8ba8845b8bf4da7bac
|
|
| BLAKE2b-256 |
62b283be7f741db3e2808522a520182b0538de94298a95e9e4f34b6ee7b07510
|