/ justapi / RELEASE_NOTES_2.0.9.md
swadhinbiswas πŸ“ release: v2.0.9 release notes (commit-by-commit) Β· 8/8/2026
d98b137
115 lines Β· 4.5 KB
Raw Download

JustAPI v2.0.9 β€” Native async DB awaits, Rust-native SSE, tokenless CI publishing

Release date: 2026-08-08

The release that makes "Python writes the logic, Rust does everything else"
literal: async DB queries run on Rust's runtime with the GIL released, SSE
streams are generated with zero Python per event, and publishing to PyPI now
happens from a tag push with no token.


Highlights

⚑ Native async DB awaits (ADR-093)

await app.db.query_async(...) / execute_async(...) run SQL on the DB's own
multi-threaded tokio runtime β€” the asyncio loop is never blocked, so slow
queries (Postgres, network DBs) don't serialize other requests.
Measured: 53Γ— faster than the blocking path on slow queries (320 vs 6 RPS).

@app.get("/users/{uid}")
async def get_user(request, uid: int):
    row = await app.db.query_async("SELECT * FROM users WHERE id = ?", [uid])
    return row

πŸ“‘ Rust-native SSE streaming (ADR-088)

app.sse_native(path, count, interval_ms) β€” events generated entirely in Rust.
Zero Python, zero GIL per event. 100k events stream instantly.

πŸš€ @native_async (ADR-089) + callback-driven async (ADR-086)

Mark handlers for the fastest dispatch; true parallel dispatch on free-threaded
CPython 3.14t. _DoneNotifier removes a thread hop from every async request.

🏷️ Type-checked DX

py.typed + complete .pyi stubs β€” mypy-clean on user code. 200+ stub
errors fixed (implicit-Optional, missing imports, duplicate defs, missing route
methods).

πŸ› οΈ Multi-worker prefork β€” verified

justapi serve --workers N --scale: 1.88Γ— at 4 workers (99.7k RPS),
auto-scale verified.

🎨 Modern README

Animated SVG hero (matrix rain), request-pipeline diagram, benchmark chart,
feature matrix β€” all SMIL, GitHub-safe.

πŸ” Tokenless publishing

wheels.yml publishes to PyPI via OIDC trusted publishing β€” tag push
β†’ 9-platform wheel matrix β†’ PyPI β†’ GitHub Release. No tokens, no secrets.


Full change log (27 commits)

Native async DB awaits β€” ed4da41, 8f63e8a

  • query_async/execute_async on DbPool (ADR-093)
  • 2 new tests (query/execute roundtrip, 40-concurrent via HTTP)
  • Benchmarks recorded: 53Γ— on slow queries; fast queries at parity (~4-4.7k RPS)

Rust-native SSE β€” 1281187, d8c16dd, 576a7be, 96c6ac3, 1ad2e27

  • sse_stream_response(count, interval_ms) in core (ADR-088)
  • app.sse_native() registration + sse_specs route alignment (bug fixed:
    route/vec index desync)
  • Test client wiring + tests

Async dispatch β€” 3e6fe90, 8d3c5dc, 364904a, b750899

  • _DoneNotifier callback-driven completion (ADR-086)
  • run_python_parallel for free-threaded dispatch (ADR-087)
  • @native_async decorator + _is_native_async marker (ADR-089)

DX β€” d663625, f05b19c, 4322714

  • py.typed + mypy-clean stubs
  • Scaffold demos differentiators (query_async, @native_async, sse_native)
  • Animated SVG README (hero, pipeline, benchmark, feature matrix)

Experiments (recorded, not shipped) β€” 28d6fda, bfff404

  • ADR-090/091: native-awaitables β€” no driver beats asyncio's stepping
    (16Β΅s vs 0.56Β΅s/await); justapi beats Granian on real async (3.9k vs 2.9k RPS)
  • ADR-092: multi-loop dispatch A/B β€” neutral-to-worse, reverted

CI & Release β€” bf007b1, 0598cf5, 76a363c, 3537c75, 7746001, 51015a2, 4188668, a9534e5, 905df9e

  • OIDC trusted publishing (no token) + GitHub Release in-pipeline
  • 9-platform wheel matrix: manylinux/musllinux Γ— x86_64/aarch64, macOS arm64
    • x86_64 (zig cross), Windows x64, free-threaded 3.14t β€” all green
  • Windows compile fix: Unix-only APIs #[cfg(unix)]-gated
  • Dropped PyO3/maturin-action (invalid inputs, broken venv) β†’ direct maturin
    • zig from ziglang.org
  • Repo hygiene: 160 MB purged from git history (.git 225 MB β†’ 61 MB)

Honesty β€” 5426d7e

  • AI/inference phases (41-52) stay 🟑/πŸ”΄ (no real GPU run) and are excluded
    from the release narrative β€” the story is the verified web framework.

Install

pip install justapi==2.0.9

Wheels

  • manylinux_2_17 + musllinux_1_2 Γ— x86_64 + aarch64
  • macOS arm64 + x86_64
  • Windows x64
  • Free-threaded CPython 3.14t (cp314-cp314t)

Docs