No project description provided
Project description
django PID
django_pid: Extensible PID Pool Management for Django
django_pid is a Django app for managing persistent identifiers (PIDs) such as Handle, DOI, ARK, and more. It provides:
- PID pool management: Pre-registers and reserves PIDs, ensuring a ready supply for assignment to resources.
- Server abstraction: Supports multiple PID server types via a flexible factory pattern.
- Asynchronous operations: Uses Celery tasks for pool replenishment, health checks, and retry logic.
Key Features
- Extensible PIDService Factories: Easily add support for new PID systems by registering custom service builders (see
object_factory.py). The default implementation uses the PID4Cat Handle server, but you can plug in other PID services by implementing and registering a compatible factory. - Robust pool lifecycle: Handles server outages gracefully, with local handle generation and exponential back-off retries.
- Django ORM integration: Models for PID servers, types, and pool entries, with custom managers for pool logic.
Installation
This project uses uv as the default Python package manager and runtime. Do not use pip directly.
uv sync # Install all dependencies from pyproject.toml
For development tools and formatting:
uv run ruff check --fix .
uv run ruff format .
Usage
Add django_pid to your Django INSTALLED_APPS and migrate:
python manage.py makemigrations django_pid
python manage.py migrate
Configure PID servers and types via the Django admin or fixtures. The app will maintain PID pools and handle assignment automatically.
Extending with Custom PID Services
To support additional PID systems, implement a service class with the required interface (see pid_service_builders/pid4cat.py) and register it in the object factory (object_factory.py). This allows seamless integration of new PID backends without modifying core logic.
Project Structure
src/django_pid/models.py: ORM models for servers, types, and PIDssrc/django_pid/tasks.py: Celery tasks for pool managementsrc/django_pid/object_factory.py: Generic factory for service builderssrc/django_pid/pid_service_builders/: Service implementations (default: PID4Cat)
License
See LICENSE for details.
Features
Installation
pip install django_pid --index-url https://gitlab.com/api/v4/projects/<gitlab-project-id>/packages/pypi/simple
Usage
django_pid --help
Development
git clone gitlab.com/opensourcelab/django-pid
# create a virtual environment and activate it then run
pip install -e .[dev]
# run unittests
invoke test # use the invoke environment to manage development
Documentation
The Documentation can be found here: https://opensourcelab.gitlab.io/django-pid or django-pid.gitlab.io
Credits
This package was created with Cookiecutter and the gitlab.com/opensourcelab/software-dev/cookiecutter-pypackage project template.
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 django_pid-0.1.0.tar.gz.
File metadata
- Download URL: django_pid-0.1.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e22e450c012697eadeafea1b77263b1a9e4b8848d5079a5908f86d9a6f7bb4
|
|
| MD5 |
f8437abaf7d22e7424c59978cd13531f
|
|
| BLAKE2b-256 |
d115b697dfa0a6646e5a89ff0422287287a9813e0948559868d37f163b4cb56c
|
File details
Details for the file django_pid-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_pid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a328c285668718dac4ee2a5a6f8e6665c0028dff5c578c3f96f5a550755f93c
|
|
| MD5 |
21736c0a8c78d0c7baf929bae400eceb
|
|
| BLAKE2b-256 |
02b781168cea2468ebe1fdd81fe72ba47d0801f027157f99ebe868e51d7de755
|