Skip to main content

Veloce

Fast, ergonomic async Python web framework — ASGI-native, batteries included.

PyPI Python versions License CI Docs CodSpeed Sponsor


Documentation: veloceframework.com

Source code: https://github.com/Lokesh-Tallapaneni/veloce


Veloce framework (PyPI: veloceframework) is an ultra-fast async Python web framework — ASGI-native and batteries-included.

Veloce is a from-scratch async Python web framework. The router, request/response pipeline, dependency injection system, OpenAPI generator, WebSocket layer, and test client are all in-tree — not wrappers around an existing stack.

Position

Veloce is a from-scratch async Python web framework — not a wrapper around Starlette, FastAPI, or Flask. It provides FastAPI-style typed dependency injection, Pydantic v2 request/response validation, OpenAPI 3.1 schema generation, WebSocket support, and Flask-compatible helpers (g, flash, blueprints, session) in a single tree. It is built on a radix-tree router, an in-memory test client, and built-in CORS/CSRF/session/rate-limit/security-headers middleware. An external security review of the request path is planned ahead of 1.0; until then, treat it as pre-production software.

Key design points

  • Async-first handlers. async def handlers run directly on the event loop; sync def handlers are supported transparently and run in a thread-pool executor so they do not block it.
  • Precompiled dispatch. Handler signatures are inspected once at registration into a HandlerPlan; the per-request hot path performs no reflection.
  • Radix-tree routing with typed path converters (int, float, uuid, path, plus custom).
  • Typed dependency injection via Depends, Security, SecurityScopes, including yield-style dependencies with teardown.
  • OpenAPI 3.1 generated from Pydantic models, served through Swagger UI and ReDoc out of the box.
  • In-memory test client drives the real ASGI surface — no sockets, no separate server process.

Requirements

Python 3.10+.

Veloce depends on a small native-extension stack: orjson, httptools, pydantic v2, python-multipart, multidict, and uvloop on non-Windows platforms.

Installation

pip install veloceframework

The installed package exposes the veloce import:

from veloce import Veloce

Example

Create main.py:

from veloce import Veloce

app = Veloce()


@app.get("/")
async def index() -> dict[str, str]:
    return {"hello": "world"}


@app.get("/items/{item_id:int}")
async def read_item(item_id: int) -> dict[str, int]:
    return {"item_id": item_id}

Run it with the built-in server (no extra dependencies):

veloce run main:app

uvicorn is an optional extra — install it (pip install veloceframework[uvicorn]) to serve under it or any other ASGI server, or use app.run() / the gunicorn VeloceWorker:

uvicorn main:app

Open http://127.0.0.1:8000/items/42 to see {"item_id": 42}, or http://127.0.0.1:8000/docs for the interactive OpenAPI UI.

Feature surface

Area Highlights
Routing radix tree, path converters, blueprints with nesting, subdomain routing, host constraints
Requests streaming bodies, multipart, JSON, MultiDict query/headers/cookies, rich URL/header accessors
Responses JSONResponse, HTMLResponse, StreamingResponse, FileResponse, ETag/Last-Modified
Dependency inj. Depends, Security, SecurityScopes, Annotated[T, Depends()], yield + teardown
Validation Pydantic v2 query / path / header / cookie / body, structured 422 errors
OpenAPI OpenAPI 3.1, Swagger UI, ReDoc, security schemes, webhooks, callbacks, operation_id
WebSockets full ASGI surface, dependency injection, subprotocol negotiation (under an ASGI server), typed iter helpers
Middleware CORS, GZip, TrustedHost, HTTPSRedirect, ProxyFix, Session, CSRF, BaseHTTPMiddleware
Templating Jinja2 with url_for / g / current_app globals, async render, context processors
Sessions signed cookies, server-side backend, permanent_lifetime, secret rotation
Testing in-memory TestClient, multipart, cookies, follow-redirects, session_transaction
Tooling veloce run, veloce routes, veloce shell (argparse-based CLI)

The full Tier 0/1/2 feature matrix and per-feature design notes live in docs/.

Project status

Veloce follows semantic versioning: the public API surface — the names exported from veloce/__init__.py — is what each release commits to. The current version is shown by the PyPI badge above.

Sponsor

Veloce is developed in the open. If it is useful to you, you can support its continued development through GitHub Sponsors.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veloceframework-0.17.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veloceframework-0.17.0-py3-none-any.whl (757.2 kB view details)

Uploaded Python 3

File details

Details for the file veloceframework-0.17.0.tar.gz.

File metadata

  • Download URL: veloceframework-0.17.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for veloceframework-0.17.0.tar.gz
Algorithm Hash digest
SHA256 631596d876dc9c0c392f5db2ebc3a509e763cbf229cd390c9e87d32ddb526c44
MD5 e546cb70465f81d1a19b47bdcccd617d
BLAKE2b-256 f32ddd6b21a7e718c6a0e8b62b41e9cd99970b8f69486d4cec8f8b1f4fa046bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for veloceframework-0.17.0.tar.gz:

Publisher: release.yml on Lokesh-Tallapaneni/veloce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file veloceframework-0.17.0-py3-none-any.whl.

File metadata

File hashes

Hashes for veloceframework-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcdb410e30d48c24853bbe6638c90ad18ed119683634930c7dd2bd097fdcc51a
MD5 218cd276ccd8cb74a342baa8350a159d
BLAKE2b-256 940c45f72f92164eba96b35629786db0584b912f4fd11493bd99d01c75130426

See more details on using hashes here.

Provenance

The following attestation bundles were made for veloceframework-0.17.0-py3-none-any.whl:

Publisher: release.yml on Lokesh-Tallapaneni/veloce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.1

2 files

This release

0.17.0 This release

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page