๐Ÿš€ Software ยท LARZ-201 · Session 1 of 8

Production Architecture

How a Larz app runs in production: WSGI, gunicorn workers, and configuration โ€” and what the dev server is not.

⏱ 9 min read📅 Updated 2026-07-25📊 Code examples throughout

In LARZ-101 you ran the app with app.run(). That's the dev server โ€” single-threaded, for local work only. In production a Larz app is a WSGI callable you hand to a real server like gunicorn.

pip install larz gunicorn
gunicorn -c deploy/gunicorn.conf.py app:app

Configuration from the environment

import os, larz.ops as ops
ops.load_env(".env")
app = Larz(secret=os.environ["SECRET"])

Takeaways

  • app.run() is dev-only; use gunicorn (or uWSGI/waitress) in production.
  • Larz is WSGI/sync โ€” scale out with more workers.
  • Secrets come from env vars; the repo ships a Dockerfile, systemd unit and nginx config.

More in this course

Course home → · Browse all courses →