tachyon-api
v1.3.0 on PyPI

The Python API framework
built for speed.

FastAPI-compatible syntax. msgspec + orjson stack. Endpoint pre-compilation at startup. 5.53x faster throughput with a fraction of the boilerplate.

5.53x
faster than FastAPI
~2.3ms
avg latency
4
core dependencies
app.py
from tachyon_api import Tachyon, Struct, Body, Query
from tachyon_api.di import injectable, Depends

app = Tachyon()

# msgspec Struct — ultra-fast validation in C
class User(Struct):
    name: str
    email: str

# @injectable — zero-boilerplate DI
@injectable
class UserService:
    def create(self, user: User) -> dict:
        return {"id": 1, "name": user.name}

@app.post("/users", response_model=User)
def create_user(user: User = Body(), svc: UserService = Depends()):
    return svc.create(user)

Performance

5.53x faster
than FastAPI.

Benchmarked against FastAPI 0.136.1 (Pydantic v2) with uvloop + httptools. 1 worker, 100 concurrent connections, 10 seconds per scenario.

Live race simulation

Real benchmark data · 100 concurrent connections

Tachyon API
req/s
F
FastAPI
req/s

Select a scenario and press Run race to start the simulation

All scenarios — req/s (higher is better) 100 connections · 1 worker · uvloop
Scenario Tachyon FastAPI
Hello World 49,755 10,314
Path + query params 37,598 7,166
Body validation 40,916 8,371
Nested body 39,994 8,027
Response model 47,561 6,343
Header + auth 45,415 8,701
Dependency injection 45,610 6,449
Multiple query params 34,111 6,264
Total throughput 340,960 61,635

Hardware: Apple Silicon · Python 3.10 · uvicorn + uvloop + httptools · single worker

Code comparison

Same idea.
Less noise.

Tachyon uses the FastAPI mental model you already know — but removes the boilerplate, especially in dependency injection and validation.

Tachyon API
from tachyon_api import Tachyon, Query

app = Tachyon()

@app.get("/hello")
def hello(name: str = Query("World")):
    return {"msg": f"Hello, {name}"}
F
FastAPI
from fastapi import FastAPI
from typing import Optional

app = FastAPI()

@app.get("/hello")
def hello(name: Optional[str] = "World"):
    return {"msg": f"Hello, {name}"}

No `@lru_cache` boilerplate

DI singletons with just `@injectable` — no factory function needed

Struct vs BaseModel

msgspec.Struct validates in C — 5–10× faster than Pydantic

msgspec direct encode

Struct responses use `msgspec.json.encode()` — no intermediate Python dict

Features

Everything you need.
Nothing you don't.

Core

Endpoint pre-compilation

Signature inspection, type resolution, and decoder creation happen once at startup — not on every request.

Performance

msgspec + orjson stack

Validation in C via msgspec.Struct. JSON encoding via orjson. No Pydantic, no stdlib json.

DX

Zero-boilerplate DI

@injectable marks a class as a singleton. Tachyon resolves the full dependency graph automatically.

DX

Type-safe params

Path, Query, Body, Header, Cookie, Form, File — all with alias support, defaults, and 422 errors.

Docs

Multi-UI docs

OpenAPI 3.0 auto-generated. Serve Scalar, Swagger UI, or ReDoc — pick your preference.

Security

Security built-in

HTTPBearer, HTTPBasic, OAuth2PasswordBearer, APIKey — just Depends() and done.

CLI

CLI scaffolding

tachyon new my-api generates a production-ready project. tachyon generate service users --crud adds a full module.

Testing

TDD from day one

TachyonTestClient + dependency_overrides make unit and integration tests clean and deterministic.

Lightweight

4 core dependencies

starlette, msgspec, orjson, uvicorn. That's it. No hidden transitive bloat.

Performance

27 precompiled extensions

pip install tachyon-api ships prebuilt Cython wheels for Linux, macOS (arm64), and Windows — no compiler needed. Pure Python fallback is automatic on unsupported platforms.

Start in 30 seconds.

Install from PyPI and run your first endpoint.

$ pip install tachyon-api
app.py
from tachyon_api import Tachyon

app = Tachyon()

@app.get("/")
def root():
    return {"message": "Running at lightspeed"}
uvicorn app:app --reload --loop uvloop

27 Cython extensions ship precompiled — no compiler required:

Linux x86_64 & aarch64 macOS arm64 Windows x86_64
CPython 3.10 · 3.11 · 3.12 · 3.13  ·  pure Python fallback on other platforms