Skip to main content

Veloce

Async Python web framework where one route definition drives an HTTP endpoint, an OpenAPI operation and an MCP tool — ASGI-native, batteries included.

PyPI Downloads 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, string, uuid, path, date, datetime, time, timedelta, decimal, any, 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 orjson, httptools, pydantic v2, python-multipart, multidict, jinja2, and uvloop on non-Windows platforms.

Installation

pip install veloceframework

That alone serves, via the built-in app.run() server. For a deployment, the standard extra adds uvicorn, brotli and msgspec:

pip install "veloceframework[standard]"

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:

veloce run main:app

veloce run serves under uvicorn when it is installed and falls back to the built-in server, which needs no extra dependencies. To pin the built-in server regardless, call app.run().

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, compression (zstd/brotli/gzip), TrustedHost, HTTPSRedirect, ProxyFix, Session, CSRF, CSP, security headers, conditional GET, request IDs, logging, BaseHTTPMiddleware
Templating Jinja2 with url_for / g / current_app globals, async render, context processors
Sessions signed cookies, server-side backend, permanent_lifetime, secret rotation
Streaming Server-Sent Events (EventSourceResponse, ServerSentEvent), streamed request bodies
Signals request_started / request_finished / got_request_exception and the app-context pair
Security password hashing (hash_password, is_strong_password), signing, JWT, OAuth2 flows
Rate limiting FixedWindow / SlidingWindow / TokenBucket, per-route @rate_limit, Redis backend
Caching Cache / InMemoryCache, the @cached decorator, Redis backend
Agents (MCP) expose routes as Model Context Protocol tools, resources, prompts; HTTP / SSE / stdio transports
Testing in-memory TestClient, multipart, cookies, follow-redirects, session_transaction
Tooling veloce new / generate scaffolding, run, routes, check, mcp, shell

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.

Metadata

Release files for veloceframework 0.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veloceframework 0.21.0
File Size Uploaded Provenance Actions
veloceframework-0.21.0.tar.gz 2.0 MB With provenance Details for veloceframework-0.21.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for veloceframework 0.21.0
File Interpreter ABI Platform Actions
veloceframework-0.21.0-py3-none-any.whl Python 3 none any Details for veloceframework-0.21.0-py3-none-any.whl

Total release size: 2.7 MB

Release files / veloceframework-0.21.0.tar.gz

Download URL veloceframework-0.21.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
58ee20467254744e88468922821259064067440e1da6157b87fe7f538f48b1a1
BLAKE2b-256 checksum
How to use checksums
199df4e6c08f530bbd2b1eb3d86b738e03d409921a142b82d63eba1ba987ece6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / veloceframework-0.21.0-py3-none-any.whl

Download URL veloceframework-0.21.0-py3-none-any.whl
Size 732.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c81325eae8e46e3ee1c3e37e387cc30d61f8617ce38a7bfde1e5ca0d09712a5
BLAKE2b-256 checksum
How to use checksums
4154d15a7b41b841102867cc8f285e288d1c242fa39b5597610b6940525e9a49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for veloceframework 0.21.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for veloceframework-0.21.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

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