Skip to main content

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 46.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for palace-opds 46.0.0
File Size Uploaded
palace_opds-46.0.0.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for palace-opds 46.0.0
File Interpreter ABI Platform
palace_opds-46.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.0 kB

Release files / palace_opds-46.0.0.tar.gz

Download URL palace_opds-46.0.0.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
758b9b1fcd964553c65243d1aaece2d5c660a0c8195fe59dc7c45f357a5d3228
BLAKE2b-256 checksum
How to use checksums
01571ecc4200b60a92e24b7ffa7d2e73844f82564cc43f11f2078327644d88d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 1, 2026.

Transparency log

Release files / palace_opds-46.0.0-py3-none-any.whl

Download URL palace_opds-46.0.0-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fff9f7e05d52cad8f21e23f021f89fd2d8446c5c9a4b0d84af69064f261392e
BLAKE2b-256 checksum
How to use checksums
d91b39f2d97c98e988914815873267d59b73a92cb9159f5ed307af4975172569
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

48.1.0

2 release files

48.0.0

2 release files

47.0.0

2 release files

This release

46.0.0 This release

2 release files

45.3.0

2 release files

45.1.0

2 release files

44.0.5

2 release files

44.0.4

2 release files

44.0.3

2 release files

44.0.2

2 release files

44.0.1

2 release files

44.0.0

2 release files

43.0.0

2 release files

41.1.1

2 release files

41.1.0

2 release files

41.0.0

2 release 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