Skip to main content

parody-web

A reusable Django app that serves a parody build artifact as a public book site, with section-level auth gating. It's the web surface of the parody ecosystem:

  • parody — core: builds the artifact (and the print/LaTeX side, for now)
  • parody-webthis: renders an artifact as a website
  • (future) parody-print — if/when the LaTeX side is split out of core

You pip install parody-web into a thin per-book Django project; the package is generic, so one codebase serves every book site. Each book differs only by config + content. First site: the partial Real-Time Computing book at rtcbook.org.

Access model

The site imports the full artifact and gates by section: the public sees only online_only sections (the openly-licensed subset); the private parts require login, and only the owner has an account. One deployment serves both the public partial book and — to the owner — the whole thing. (If you'd rather the full text never touch the database, import the partial parody build --online-only artifact instead — then there are no private sections.)

Why a Django app (not a static site)

Parody artifact html is Django-template-flavored — it embeds {% media %}, {% static %}, {% cite %} etc. This app renders it natively through the Django template engine (parody_web.templatetags.parody_web.render_book), so there's no second, lossy tag-resolution renderer to maintain.

Use it in a project

# settings.py
INSTALLED_APPS = [..., "parody_web"]
BOOK_SLUG = "real-time-computing"     # which imported book is the site root
# urls.py
urlpatterns = [path("", include("parody_web.urls")), ...]
pip install parody-web
python manage.py migrate
python manage.py createsuperuser                       # the owner (only account)
python manage.py import_artifact rtc.json --slug real-time-computing

Provides: Book/Chapter/Section models, the import_artifact command (upsert-by-slug, idempotent), index + section views, templates (override them in your project), and the rendering template tags. Reads settings.BOOK_SLUG, MEDIA_URL, LOGIN_URL.

A ready-to-copy thin project — settings, urls, Procfile, and AWS/SSM deploy glue — lives in example_site/; generate a new book site from it.

Serving a book from your own project

A host project (a course site, say) can serve a parody book while keeping its own readers, gating, and per-user features. See Host integration for the four seams: imported per-exercise solutions/problems, the pluggable access policy (PARODY_WEB_ACCESS_POLICY), the per-user overlay include points, and the Section.key join key.

Develop

pip install -e .
python runtests.py            # standalone test suite (tests/settings.py)

Deploy

AWS via SSM + GitHub Actions, designed for reuse across book projects: each book site is a small repo (copied from example_site/) that pins this package and calls the shared reusable workflow (deploy-reusable.yml) — improve the renderer or the deploy once, every site picks it up. Runbook: example_site/deploy/AWS.md.

Status

0.x — interfaces may change. Renders the rtc artifact end to end with section-level auth gating; 9 tests. {% cite %} currently renders [key] (wire citeproc/a .bib for full citations). Not yet published to PyPI or deployed to rtcbook.org (owner steps).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parody_web-0.45.3.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parody_web-0.45.3-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file parody_web-0.45.3.tar.gz.

File metadata

  • Download URL: parody_web-0.45.3.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for parody_web-0.45.3.tar.gz
Algorithm Hash digest
SHA256 0258d298e9acd06aae7b9692d4446ca9153837c05073efa943640d2bb913e156
MD5 27e183c56b7af33c96f8a92c75e4bb45
BLAKE2b-256 abfd6d91c183ae6731d0d4cdc60be4f6e3b6d4ab07edfd3722357a683d126a08

See more details on using hashes here.

File details

Details for the file parody_web-0.45.3-py3-none-any.whl.

File metadata

  • Download URL: parody_web-0.45.3-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for parody_web-0.45.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ade0c51ca4786207763798d4e35517b6a4e2d20df947efc90a5430b842ed88c3
MD5 7015968f0ce8f5d16c73191e7f7a13fb
BLAKE2b-256 5412fb4eb05fd1f073fa62598e82d769d9e3123b28bb81562344ac79d27b55cb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.98.0

2 files

0.96.0

2 files

0.95.0

2 files

0.94.0

2 files

0.93.0

2 files

0.92.0

2 files

0.91.0

2 files

0.90.0

2 files

0.89.0

2 files

0.88.0

2 files

0.87.0

2 files

0.86.0

2 files

0.85.0

2 files

0.84.0

2 files

0.82.0

2 files

0.79.0

2 files

0.78.0

2 files

0.77.0

2 files

0.76.0

2 files

0.75.0

2 files

0.74.0

2 files

0.73.0

2 files

0.72.1

2 files

0.72.0

2 files

0.71.0

2 files

0.70.0

2 files

0.69.0

2 files

0.68.0

2 files

0.67.0

2 files

0.66.1

2 files

0.66.0

2 files

0.65.0

2 files

0.64.1

2 files

0.64.0

2 files

0.63.0

2 files

0.62.0

2 files

0.61.0

2 files

0.60.0

2 files

0.59.1

2 files

0.59.0

2 files

0.58.1

2 files

0.58.0

2 files

0.57.1

2 files

0.57.0

2 files

0.56.0

2 files

0.55.1

2 files

0.55.0

2 files

0.54.1

2 files

0.54.0

2 files

0.53.0

2 files

0.52.0

2 files

0.49.0

2 files

0.48.1

2 files

0.48.0

2 files

0.47.0

2 files

0.46.0

2 files

0.45.4

2 files

This release

0.45.3 This release

2 files

0.45.2

2 files

0.45.1

2 files

0.45.0

2 files

0.44.1

2 files

0.44.0

2 files

0.42.0

2 files

0.41.2

2 files

0.41.1

2 files

0.41.0

2 files

0.40.0

2 files

0.39.2

2 files

0.39.1

2 files

0.39.0

2 files

0.38.0

2 files

0.37.1

2 files

0.37.0

2 files

0.36.0

2 files

0.35.0

2 files

0.34.2

2 files

0.34.1

2 files

0.34.0

2 files

0.33.0

2 files

0.31.3

2 files

0.31.2

2 files

0.31.1

2 files

0.31.0

2 files

0.30.1

2 files

0.30.0

2 files

0.29.1

2 files

0.29.0

2 files

0.28.2

2 files

0.28.1

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

1 file

0.1.0

2 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