Larz › Changelog
Changelog
Every Larz release, what changed, and why. Follow along on GitHub or PyPI.
v2.1.0
- Added Project scaffolder โ
larz new <name> --template api|saas|ai|marketplace|minimalgenerates a complete, runnable project (app, tests, requirements, .env, README).larz new --list. - Added Real-world examples โ
url_shortener.py(links + click analytics + metered API) andlink_in_bio.py(a Linktree with a Pro tier). - Added Benchmarks โ
bench/bench.pymeasures honest in-process dispatch throughput. - Changed Implicit free tier โ unentitled users fall back to the cheapest $0 plan, so
app.within_limit/app.featurework for free-tier users without an explicit subscription. - Changed 60 new tests (334 total), CI green.
v2.0.0
- Added ASGI / async core โ the app is dual-protocol (WSGI and ASGI, detected automatically). Handlers can be
async defor sync; ASGI lifespan driveson_startup/on_shutdown. - Added WebSockets โ
@app.websocket("/ws/<room>")with aWebSocketobject (accept/receive/send/send_json/close,async for). - Added Built-in zero-dependency async server (
larz.aserver) โapp.run_async()speaks HTTP/1.1 and RFC 6455 WebSockets over pure asyncio; no uvicorn required. - Added Pure-Python PostgreSQL driver (
larz.pg) โ v3 wire protocol with SCRAM-SHA-256 (RFC 7677), md5 and cleartext auth, parameterized injection-safe queries.connect("postgres://โฆ")switches the ORM to Postgres; sqlite stays default. - Added
Response.stream()/Response.sse()work over ASGI as well as WSGI. - Changed 21 new tests (274 total). SCRAM verified against the RFC test vector; the ORM verified end-to-end against a live PostgreSQL 15 server. Backward-compatible with 1.x.
v1.3.0
- Added Typed request binding (
larz.params) โ annotate handler parameters and Larz validates, coerces and injects them; bad input yields a 422 with per-field errors. Dataclass request bodies and Query/Path/Body/Form markers. - Added Dependency injection โ
Depends(fn), resolved and cached per request. - Added Streaming & Server-Sent Events โ
Response.stream()andResponse.sse()for large downloads and real-time push over plain WSGI. - Added Typed OpenAPI โ
/openapi.jsonreflects the typed signatures; the built-in self-contained/docsexplorer shows parameters (no CDN). - Added CORS (
app.enable_cors()with preflight) and lifecycle hooks (@app.on_startup/@app.on_shutdown, also under gunicorn). - Changed Middleware now runs before routing, so it can short-circuit any request.
- Changed Genericized provider docs and confirmed the package makes no calls to any vendor server โ no telemetry, runs entirely on your infrastructure. 33 new tests (253 total).
v1.2.0
- Added Pricing-as-code (
larz.pricing) โ onePricing()object declares plans, usage prices, credit packs and coupons, and generates the/larz/pricingpage, checkout, entitlements and metered prices. - Added Feature flags & limits by plan โ
app.feature(req, name),app.within_limit(req, key, n),app.current_plan(req). - Added Revenue analytics (
larz.analytics) โ MRR, ARR, ARPU, LTV, churn and a 30-day chart at/larz/admin/revenue;app.money.metrics(). - Added Dunning & recovery โ
app.money.run_dunning()retries lapsed renewals on a schedule and revokes after a grace period;on_payment_failedhook. - Added Referrals & affiliates (
larz.referrals) โ referral links and automatic commissions to the referrer's payout ledger when a referred user pays. - Added AI monetization (
larz.ai) โ@app.ai_metered+app.ai.charge()bill tokens with sub-cent accuracy, BYOK keys encrypted at rest, per-plan rate limits, and an optional metered proxy. - Added Authenticated encryption (
larz.crypto.Cipher) โ HMAC-SHA256-CTR + encrypt-then-MAC for secrets at rest, standard-library only. - Changed 56 new tests (220 total), CI green. Backward-compatible with 1.0/1.1.
v1.1.0
- Added TOTP two-factor authentication (
larz.twofa) โ RFC 6238 codes for Google Authenticator / Authy / 1Password, one-time backup codes,@app.twofa_required. - Added Social login (
larz.oauth) โ Google, GitHub and any OAuth2 provider over urllib; finds-or-creates a User by email. - Added File uploads โ
req.filesmultipart parsing (no cgi module) pluslarz.storage.LocalStoragewith safe names and mounting. - Added Marketplace payouts โ
app.money.split(...)records a seller/platform split ledger;owed(),payouts(),mark_paid(). - Added Four payment providers โ Square, Razorpay, Mollie and Coinbase Commerce (10 โ 14), all behind the same adapter contract.
- Added Test client (
larz.testing.Client) โ in-process WSGI client with a cookie jar for fast, socketless tests. - Added Flash messages (
req.flash/get_flashed_messages),req.htmxandResponse.hx_trigger()for HTMX apps, and a runnable marketplace example. - Changed 52 new tests (164 total), CI green on Python 3.11โ3.13. Backward-compatible with 1.0 โ every new module is opt-in.
v1.0.2
- Fixed
RateLimiteris now directly usable as middleware withapp.use(RateLimiter(limit=300, window=60)). - Fixed Undefined template variables now render as empty strings instead of raising
NameError, matching common template-engine behavior.
v1.0.1
- Changed Packaging and metadata fixes for PyPI trusted publishing.
v1.0.0
- Added First stable release: the money-native core โ
@app.paid,@app.metered,@app.plan, credit packs, a customer portal and an admin dashboard. - Added Ten payment providers (Stripe, Paddle, Lemon Squeezy, Paystack, PayPal, GemVault, Dodo, crypto, and a keyless mock) behind one adapter contract.
- Added Accounts & plan-scoped API keys, an ORM with migrations and transactions, templating, an auto-admin, background jobs and an API toolkit (validation, OpenAPI docs, signed webhooks, blueprints).
- Added Zero runtime dependencies โ everything on the Python standard library. Ships with a Dockerfile, gunicorn config, systemd unit and nginx config.