AstraAPI
FastAPI-compatible. C++ core. Built-in workers. No gunicorn needed.
AstraAPI is a drop-in replacement for FastAPI with a compiled C++20 core. Same decorators. Same Pydantic models. Same OpenAPI docs. But 5-10x faster — no external server required.
from astraapi import AstraAPI
app = AstraAPI()
@app.get("/")
def hello():
return {"message": "Hello World"}
if __name__ == "__main__":
app.run(port=8000, workers=4)
Output:
C++ HTTP server running on http://127.0.0.1:8000
Press Ctrl+C to stop
Why AstraAPI?
| FastAPI + Uvicorn | AstraAPI | |
|---|---|---|
| HTTP parser | httptools (Python) |
llhttp (C++, Node.js) |
| JSON | orjson |
yyjson + SIMD serializer |
| Workers | gunicorn/uvicorn | Built-in fork/spawn |
| Keep-alive | Per-connection timers | Batch sweep |
| Compression | zlib | libdeflate (2-3x faster) |
| Throughput | ~45k req/s | ~236k req/s |
Install
pip install astraapi
Python 3.14+
Quick Start
python -m astraapi --help
Or write a file:
from astraapi import AstraAPI
from pydantic import BaseModel
app = AstraAPI()
class Item(BaseModel):
name: str
price: float
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
@app.post("/items/")
def create_item(item: Item):
return item
if __name__ == "__main__":
app.run(port=8000, workers=4)
Features
- 100% FastAPI compatible — same
@app.get,Depends,BaseModel,Query,Path,File,UploadFile,WebSocket,BackgroundTasks - Built-in multi-worker server —
SO_REUSEPORT, CPU affinity, auto-restart. No gunicorn. - C++ HTTP core — llhttp parser, radix trie router, yyjson, SIMD string escape, ryu float formatting
- Zero-copy transport — direct
send()for small responses,writev()for WebSockets - Native middleware — CORS, GZip (libdeflate), TrustedHost, HTTPSRedirect, RateLimiting
- Real TestClient — starts actual C++ HTTP server on ephemeral port
- Hot reload —
app.run(reload=True)watches files viawatchfiles
Documentation
Visit https://astraapi.dev or the docs folder.
License
MIT — see LICENSE.
Made with ⚡ by Lumos Labs HQ
Metadata
Release files for astraapi 0.2.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| astraapi-0.2.11.tar.gz | 3.0 MB | Without provenance | Details for astraapi-0.2.11.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| astraapi-0.2.11-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details for astraapi-0.2.11-cp314-cp314-win_amd64.whl |
| astraapi-0.2.11-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details for astraapi-0.2.11-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
| astraapi-0.2.11-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 | Details for astraapi-0.2.11-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
| astraapi-0.2.11-cp314-cp314-macosx_14_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 14.0+ ARM64 | Details for astraapi-0.2.11-cp314-cp314-macosx_14_0_arm64.whl |
Total release size: 7.1 MB
Release files / astraapi-0.2.11.tar.gz
| Download URL | astraapi-0.2.11.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36d85689cab20438b59cb705e3efb6e2b0f5954e7d614ff3b8292dc03bce3419
|
|
BLAKE2b-256 checksum How to use checksums |
7ea7448fa02037eac8bac7b81b4e7ba73841cdc03904af316ecdd45a5b9280fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / astraapi-0.2.11-cp314-cp314-win_amd64.whl
| Download URL | astraapi-0.2.11-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 514.5 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3461686ecf471e8c52fb548eef2ec10d71023e9a849b9a5494dfbe1bfa3b700f
|
|
BLAKE2b-256 checksum How to use checksums |
ef7726252251ec4802f34c3e4146b9107530de77c8ea587885cb6ca47ab9f890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / astraapi-0.2.11-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | astraapi-0.2.11-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c461f0a9682e15d839a6708292a883381647ba0830f73af25fe08dea2f20f71
|
|
BLAKE2b-256 checksum How to use checksums |
a03f53c0f5de6c8b44bbd661fb117942914e2c57e173ed8eb5b67a97e47fb3fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / astraapi-0.2.11-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | astraapi-0.2.11-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
db2f52fbc131310886e19bb96b26d52b0fa0914cdae0c4b6bda12fa490b4fe23
|
|
BLAKE2b-256 checksum How to use checksums |
a7e0d6c3e338814f1f529a9d55db77b9bc30d4bdb68df0c5b6c850df903005e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / astraapi-0.2.11-cp314-cp314-macosx_14_0_arm64.whl
| Download URL | astraapi-0.2.11-cp314-cp314-macosx_14_0_arm64.whl |
|---|---|
| Size | 944.3 kB |
| Tags | CPython 3.14 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d379312ea68eccfdb15725e61af23802f239f31d6eabbaa11ac3f72ce6ae7723
|
|
BLAKE2b-256 checksum How to use checksums |
b5bc2d7ae20cd1adffb19fa2e2ea57cc3a211fc11dbb0034a19c64c8dbb963be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for astraapi 0.2.11
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.