Production deployment
A Larz app is a WSGI callable โ hand it to gunicorn.
pip install larz gunicorn
gunicorn -c deploy/gunicorn.conf.py app:app class=com># app.py exposes `app`
The repo's deploy/ folder has ready-made Dockerfile,
gunicorn.conf.py, a systemd unit, and an nginx.conf.
Checklist
- Strong
Larz(secret=...)from an env var - Durable DB path (or Postgres); never
/tmp - Real payment provider (Mock is dev-only) + webhook URL set
- Rate limiter + bot filter + CSRF on
- HTTPS everywhere
Jobs & scheduler across workers
@app.job and @app.schedule run per gunicorn worker. Run schedules
in a single dedicated process, or gate them behind a DB lock so only one worker fires them.
Full notes in deploy/DEPLOY.md.
Never use
app.run() (the dev server) in production โ it's
single-threaded. Larz is WSGI/sync; scale out with more workers. An async/ASGI core is on the
roadmap.