No description
- Python 94%
- HTML 5.8%
- Dockerfile 0.2%
|
|
||
|---|---|---|
| .cursor/rules | ||
| src | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| CLAUDE.md | ||
| Dockerfile | ||
| pyproject.toml | ||
| README.md | ||
| spark.yaml | ||
| uv.lock | ||
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