Ship It: Admin, Jobs & Deploy
Get an auto-admin panel, run background jobs and scheduled tasks, and deploy to production with gunicorn.
An admin panel, free
import larz.admin as admin
admin.enable(app, [User, Post], token="secret") # CRUD UI at /admin
Background jobs & a scheduler
import larz.ops as ops
ops.enable(app)
@app.job
def send_welcome(email): ...
send_welcome.enqueue("a@b.com") # off the request thread
@app.schedule("0 3 * * *") # cron: nightly
def cleanup(): ...
@app.cache(ttl=60) # cache a slow route
@app.get("/expensive")
def expensive(req): ...
Deploy
A Larz app is a WSGI callable, so hand it to gunicorn:
pip install larz gunicorn
gunicorn -c deploy/gunicorn.conf.py app:app
The repo ships a Dockerfile, systemd unit, and nginx config. Set a strong secret from an env var, use a durable database path, switch to a real payment provider, and serve over HTTPS.
You've built a full SaaS
- Payments, accounts, an API, an admin, background work โ all in one zero-dep framework.
- Next: the full documentation and the examples gallery.
- Go build something that charges money. โก