palace-opds
Pydantic models for the OPDS and Readium family of specifications used in digital-library publishing — read, validate, and emit feed and license documents with type-safe Python objects.
What's covered
- OPDS 2.0 publication and feed documents, including facets, navigation groups, and publication groups.
- Readium Web Publication Manifest (RWPM) — link models, presentation hints, encryption metadata.
- OPDS for Distributors / Authentication for OPDS 1.0 — authentication documents and link relations.
- ODL 1.0 (Open Distribution to Libraries) — license metadata, terms, protection, loan/checkout status.
- LCP (Readium Licensed Content Protection) — license documents and loan-status (LSD) documents.
- W3C accessibility metadata and schema.org publication vocabulary for the slices that OPDS feeds reference.
- Palace-specific extensions to the publication metadata vocabulary (under
palace.opds.palace) — these can be safely ignored if you don't need them.
Installation
pip install palace-opds # or: uv add palace-opds
Requires Python 3.12+.
Quick example
from palace.opds.opds2 import PublicationFeed
feed = PublicationFeed.model_validate_json(raw_feed_bytes)
for publication in feed.publications:
print(publication.metadata.title, publication.metadata.identifier)
Models live under the palace.opds namespace and follow Pydantic v2 conventions, so they
serialize to/from JSON and dictionaries with .model_dump() / .model_validate().
Design
- Spec-faithful, not opinionated. Where the OPDS / Readium specs allow flexibility, the models accept it; we don't impose application-specific constraints.
- Lean dependencies. Only the validation and serialization libraries the models actually
need (
pydantic,pycountry,uritemplate) — no web framework, ORM, or cloud SDK is pulled in transitively. - Stable, documented breakage. Breaking changes follow semver and are called out in release notes; minor releases are additive.
Project context
palace-opds is developed and maintained as part of the Palace
Project, where it powers OPDS ingestion and feed generation
for the Palace Manager digital-library
backend. It's published as a standalone package because the OPDS specs are widely shared —
other library systems, ingestion pipelines, or research tools that work with OPDS feeds can
use these models without taking on Palace Manager as a dependency.
Outside contributions and bug reports are welcome via the
ThePalaceProject/circulation repository,
where this package is developed as a uv
workspace member.
License
Apache 2.0.
Metadata
Release files for palace-opds 49.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| palace_opds-49.0.0.tar.gz | 26.3 kB | With provenance | Details for palace_opds-49.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| palace_opds-49.0.0-py3-none-any.whl | Python 3 | none | any | Details for palace_opds-49.0.0-py3-none-any.whl |
Total release size: 63.0 kB
Release files / palace_opds-49.0.0.tar.gz
| Download URL | palace_opds-49.0.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3175af755b8b132fa2e9533c998620f3d22a22ffaab23d430534be8cab00c0f6
|
|
BLAKE2b-256 checksum How to use checksums |
39b8e8e327674e2880a7b8f4ab3e811505ecf0297ab17b443e0000283924f348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / palace_opds-49.0.0-py3-none-any.whl
| Download URL | palace_opds-49.0.0-py3-none-any.whl |
|---|---|
| Size | 36.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ebd918b1f05b8834e49d839ee80ac186290cde55f064afed6a9ec9afa1e6a37
|
|
BLAKE2b-256 checksum How to use checksums |
96bf186c2aeb1725eef7e9ec799b3d94df1483010b04060747d78ed0b20aadaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for palace-opds 49.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for palace_opds-49.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA 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.