๐Ÿ’ฐ Software ยท LARZ-301 · Session 5 of 8

Docs, Versioning & Webhooks

Auto-generate OpenAPI docs, version your API with blueprints, and notify customers with signed webhooks.

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

Automatic OpenAPI docs

app.enable_docs(title="My API", version="1.0")   # /openapi.json + browsable /docs

Generated from your routes and validation schemas, tagged with metered. Customers get real docs with zero maintenance.

Versioning

from larz import Blueprint
v1 = Blueprint("v1", prefix="/api/v1")
@v1.post("/run")
def run(req): ...
app.register(v1)

Webhooks

from larz.api import Webhooks
wh = Webhooks(secret="whsec")
wh.deliver("https://customer.com/hook", "job.done", {"id": 1})   # signed + retried

Takeaways

  • /docs keeps your API self-documenting.
  • Blueprints give you clean versioned prefixes.
  • Signed, retried webhooks push events to customers.

More in this course

Course home → · Browse all courses →