No description
  • Python 94%
  • HTML 5.8%
  • Dockerfile 0.2%
Find a file
2026-10-31 15:25:59 +01:00
.cursor/rules one Spark can publish an API to another: provides.api and uses, the OpenAPI file as the allowlist, per-consumer Cilium rules that delete forged identity and set the caller, the approvals file, forge generate, callerOf and the agent rule, proved against a cluster 2026-10-31 15:25:59 +01:00
src one Spark can publish an API to another: provides.api and uses, the OpenAPI file as the allowlist, per-consumer Cilium rules that delete forged identity and set the caller, the approvals file, forge generate, callerOf and the agent rule, proved against a cluster 2026-10-31 15:25:59 +01:00
tests one Spark can publish an API to another: provides.api and uses, the OpenAPI file as the allowlist, per-consumer Cilium rules that delete forged identity and set the caller, the approvals file, forge generate, callerOf and the agent rule, proved against a cluster 2026-10-31 15:25:59 +01:00
.gitignore blueprint: python-web, the four platform concerns in Python 2026-08-11 23:56:01 +02:00
.python-version blueprint: python-web, the four platform concerns in Python 2026-08-11 23:56:01 +02:00
CLAUDE.md one Spark can publish an API to another: provides.api and uses, the OpenAPI file as the allowlist, per-consumer Cilium rules that delete forged identity and set the caller, the approvals file, forge generate, callerOf and the agent rule, proved against a cluster 2026-10-31 15:25:59 +01:00
Dockerfile blueprint: python-web, the four platform concerns in Python 2026-08-11 23:56:01 +02:00
pyproject.toml the six withdrawn ADRs are deleted, and the rule they kept alive is gone with them 2026-10-09 12:22:52 +02:00
README.md the six withdrawn ADRs are deleted, and the rule they kept alive is gone with them 2026-10-09 12:22:52 +02:00
spark.yaml one Spark can publish an API to another: provides.api and uses, the OpenAPI file as the allowlist, per-consumer Cilium rules that delete forged identity and set the caller, the approvals file, forge generate, callerOf and the agent rule, proved against a cluster 2026-10-31 15:25:59 +01:00
uv.lock one Node for the desks, the dependency backlog applied once, and the majors declined on the record 2026-10-25 12:22:06 +01:00

python-web

The blueprint for a Spark that keeps its language. An application that arrived written in Python stays written in Python; the platform's four concerns are solved here, in Python's own idiom.

src/app/routes.py        the routes, jobs among them
src/app/templates/       Jinja2 - where the original's HTML lands
src/data/                the only place that touches the database
src/db/                  connection and tables, one file per table
src/lib/identity.py      require_actor() from the platform's headers
src/lib/problem.py       expected failures are values, not exceptions
src/lib/source.py        read / read_all, cannot_work vs failed

The example

One example, and it is the shape most imported applications actually are: a scheduled job fetches from outside, replaces a table whole, and a page shows it. refresh-rates → exchange_rate → /rates. Delete all three when you no longer need them - src/db/exchange_rate.py, src/data/exchange_rate.py, the route, and src/app/templates/rates.html.

Running it

uv sync
uv run pytest        # the suite
uv run pyright       # strict, and not optional - see pyproject.toml
forge dev            # run it here, with a working login