stapel-cms
Public site content for a Stapel product: pages in a slug tree, a blog (posts, tags, date and tag archives, RSS/Atom), menus (header/footer trees targeting pages, posts, URLs or named frontend routes), SEO fields and a sitemap Function, and redirects written automatically when a published page or post moves. Bodies are typed block lists (rich_text as a ProseMirror/TipTap JSON document, hero, faq, gallery, embed with a host allowlist, a stapel-forms form by id, an opaque listing_rail query) validated by pydantic models from a MERGE registry, so a project adds its own block without forking. Staff write drafts, preview them by a signed link, publish now or on a schedule, keep editing while the published snapshot serves, restore revisions and archive; every publication is a fact. Content is site-scoped through the stapel-core site registry and locale-scoped with a fallback chain; a page can be copied into another locale, optionally through a machine-translation Function. The anonymous read is cached per site and answers conditional requests (ETag, Last-Modified). Not stapel-docs: docs is private workspace documents; cms is what an anonymous visitor reads at a URL of the site.
Part of the Stapel framework — composable Django apps that deploy as a monolith or as microservices without changing module code.
Install
pip install stapel-cms
At a glance
| Fact | Value |
|---|---|
| Version | 0.1.0 |
| Python | >=3.11 (3.11, 3.12, 3.13, 3.14) |
| HTTP operations | 41 |
| Config axes | 3 |
| Usage surface | 10 |
| Extension points | 9 |
| Error codes | 71 |
| Documented flows | 4 |
| Fleet dependencies | stapel-cdn (optional) · stapel-core · stapel-forms (optional) · stapel-translate (optional) |
Documentation
Errors: English · Español · Русский · OpenAPI · capabilities.json · llms.txt (for agents)
What this is
Public site content for a Stapel product: pages in a slug tree, a blog (posts, tags, archives, RSS/Atom), menus, SEO fields, a sitemap Function and redirects written for you when a published page moves. Staff write typed blocks, preview drafts by a signed link, publish now or on a schedule, and restore revisions; the anonymous read is cached per site and answers conditional requests. Content is scoped by the stapel-core site registry and by locale, with a fallback chain.
Not stapel-docs: docs holds private workspace documents; cms holds what an anonymous visitor reads at a URL of the site.
Quick start
INSTALLED_APPS = [
# ...
"stapel_cms",
]
STAPEL_CMS = {
"LOCALES": ["en", "de"],
"DEFAULT_LOCALE": "en",
}
# urls.py
path("cms/", include("stapel_cms.urls")) # -> /cms/api/v1/...
# settings.py — scheduled publication every minute (Celery optional;
# `manage.py cms_publish_due` runs the same pass)
from stapel_cms.beat import get_cms_beat_schedule
CELERY_BEAT_SCHEDULE = {**get_cms_beat_schedule()}
python manage.py migrate
python manage.py cms_seed # about, contacts, terms, privacy, faq as drafts
A project's own block is one pydantic model and one setting:
from pydantic import Field
from stapel_cms.blocks import BlockData
class PricingTable(BlockData):
plans: list[str] = Field(min_length=1, max_length=5)
STAPEL_CMS = {"BLOCK_TYPES": {"pricing_table": "myapp.blocks.PricingTable"}}
Concepts
- Page / Post — the row is the staff's working copy; the public reads
the published snapshot (a revision), so edits are invisible until
published again. Workflow
draft → scheduled → published → archived; every save, publish and schedule appends a revision; restore copies one back into the working copy. Optimistic lock onversion. - Blocks —
[{type, id, data}], each type a pydantic model from a MERGE registry:rich_text(a ProseMirror/TipTap JSON document — never HTML),hero,faq,gallery,embed(allowlisted hosts),form(a stapel-forms id),listing_rail(an opaque query for another module). Every link passes one safe-URL rule;javascript:and friends cannot be stored. - Paths and redirects — a page's path is its ancestors' slugs; moving a
published page (or renaming a published post) writes
old → newredirects for the whole subtree, chains collapse, a page beats a redirect. - Sites and locales — every row has a site key (stapel-core site
registry;
""on a single host) and a locale; reads fall backrequested → LOCALE_FALLBACKS → DEFAULT_LOCALE; variants share a translation group (hreflang alternates). Machine translation is an optional Function. - Caching — public bodies are cached per site and invalidated as a whole
on every publish;
ETag/Last-Modifiedanswer 304. - GDPR — staff ids are the only personal data; erasure pseudonymizes them and keeps the content.
License
MIT — see LICENSE.
This page is assembled by stapel-readme from docs/readme.md plus the contract artifacts in docs/. Edit the prose in docs/readme.md; the badges, facts and links above and below it are generated — do not hand-edit README.md.
Metadata
Release files for stapel-cms 0.1.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 |
|---|---|---|---|---|
| stapel_cms-0.1.0.tar.gz | 125.7 kB | With provenance | Details for stapel_cms-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stapel_cms-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for stapel_cms-0.1.0-py3-none-any.whl |
Total release size: 237.1 kB
Release files / stapel_cms-0.1.0.tar.gz
| Download URL | stapel_cms-0.1.0.tar.gz |
|---|---|
| Size | 125.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f0602c9501d1d59c121beeb6aedcdf48950892961a77c37d877cf5c74a05ae5
|
|
BLAKE2b-256 checksum How to use checksums |
d5c990e20cc2d52b4404417ed6475cbb15953b21443518140c65d4fd75eb2140
|
| 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 Nov 27, 2026.
Transparency logRelease files / stapel_cms-0.1.0-py3-none-any.whl
| Download URL | stapel_cms-0.1.0-py3-none-any.whl |
|---|---|
| Size | 111.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b938f41a22deb84240311345eccf739b585000c632a9a669188a25e799726e5e
|
|
BLAKE2b-256 checksum How to use checksums |
63b171e27520d22d25910264b1f18a4a55c294969a92b3dabd88e658a104fd17
|
| 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 Nov 27, 2026.
Transparency logSecurity for stapel-cms 0.1.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 stapel_cms-0.1.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 Nov 27, 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.