async · ASGI-native · typed
Veloce — Async Python Web Framework¶
Fast, ergonomic async Python web framework. Routing, dependency injection, OpenAPI, WebSockets, templating, sessions, and a built-in test client — all in one tree.
Python 3.10+ MIT licensed Type-checked pip install veloceframework
Veloce framework (PyPI: veloceframework) is an ASGI-native, async-first Python web framework for building APIs and full-stack applications. It draws Flask-compatible patterns (g, flash, blueprints, @app.route) and FastAPI-style typed dependency injection together into one tree — without depending on either. Requires Python 3.10+.
from veloce import Veloce, Request
app = Veloce()
@app.get("/hello/{name}")
async def hello(name: str):
return {"hello": name}
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8000)
Type-annotated path parameters are coerced automatically, dictionaries become JSON responses, and the route is registered on the radix tree at import time. New here? Why Veloce Exists explains the one-IR architecture the rest of the framework follows from.
Why Veloce¶
-
Fast by design
Built on raw
asynciowithorjsonandhttptools. Handler signatures are inspected once at registration — no reflection on the request hot path. -
Radix-tree routing
Path parameters are matched and type-coerced during tree traversal, with built-in
int,float,uuid,path, and custom converters. -
Typed dependency injection
Depends,Security, andSecurityScopesresolve from precompiled plans, includingyield-style dependencies with teardown. -
Batteries included
OpenAPI 3.1, WebSockets, Server-Sent Events, background tasks, middleware, signed sessions, and signals — all in core.
-
Validated, both ways
Pydantic v2 validates request bodies;
response_modelserialises and filters what goes back out. -
Honest tests
The in-memory
TestClientdrives the real ASGI surface — middleware, encoding, and cookies included.