Skip to main content

RustAPI

RustAPI Logo

FastAPI-style Python Web Framework backed by a Rust (Tokio / Hyper) Engine — with embedded Rust Database Streaming, JWT & Argon2 Primitives, Tier 3 Rust-Native Routes, and a built-in MCP Server.

PyPI GitHub Repository License: MIT Python: 3.8+ Rust: 1.75+


📦 Key Open-Source Features Included

Feature Area Implementation Details
FastAPI Compatibility FastAPI & Request aliases, status codes, EventSourceResponse (SSE), jsonable_encoder, Query/Body/Path, OAuth2PasswordBearer, HTTPBearer, APIKeyHeader, OpenIdConnect, get_openapi, app.frontend().
HTTP & Routing FastAPI-style @app.get, @app.post, APIRouter, Depends, app.dependency_overrides, response_model, reload=True.
Rust-Native Tier 3 Routes app.add_native_route() zero-GIL C-speed fast-paths (50,000+ req/sec).
Database Engine sqlx SQLite & PostgreSQL pool (app.connect_db()) with zero-copy JSON streaming (db.query_json()).
Power Primitives Native Rust encode_jwt() / decode_jwt(), Argon2 hash_password() / verify_password(), MiniJinja render_template().
Response Classes HTMLResponse, JSONResponse, PlainTextResponse, RedirectResponse, StreamingResponse, EventSourceResponse.
Request Ergonomics req.json(), req.form, req.body, UploadFile, WebSocket.
AI / MCP Integration Embedded Model Context Protocol server (@app.tool(), @app.resource(), @app.prompt()) at POST /mcp.
Telemetry & Observability Terminal access logging (INFO: 127.0.0.1 - "GET /render HTTP/1.1" 200 - 0.45ms), Swagger UI (/docs), OpenAPI (/openapi.json).

⚡ Framework Standing & Capability Comparison

rustapi delivers 100% FastAPI developer experience (DX) while running on a high-performance Rust (Tokio/Hyper) core engine.

┌───────────────────────────────────────────────────────────┐
│                    Python Layer (DX)                      │
│ FastAPI Syntax • Pydantic Models • Routers • SSE • Docs   │
└─────────────────────────────┬─────────────────────────────┘
                              │  PyO3 C-Bindings
┌─────────────────────────────▼─────────────────────────────┐
│                    Rust Tokio/Hyper Core                  │
│ Async Multi-Thread IO • Tokio Workers • sqlx DB • SSE      │
└───────────────────────────────────────────────────────────┘
Capability FastAPI RustAPI (pyrustapi) rustapi Advantage
API Syntax (@app.get, Depends, APIRouter) ✅ ✅ 100% drop-in API compatibility
Interactive Docs (/docs, /redoc) ✅ ✅ Swagger UI & ReDoc served natively
SSE Real-Time AI Streaming ✅ ✅ Low-latency token streaming for LLMs
Single-Page App Serving (app.frontend) ❌ Manual ✅ Zero-config React/Vite/Svelte dist serving
Embedded DB Engine (sqlx) ❌ None ✅ Native C/Rust DB pool with zero-copy JSON
Rust Security Primitives (Argon2/JWT) ❌ External ✅ Built-in high-speed C-extension primitives
Model Context Protocol (MCP Server) ❌ External ✅ Built-in AI Agent MCP server (POST /mcp)
Peak Throughput (Native Fast-Paths) ~5k req/s 50,000+ req/s Zero-GIL Tokio execution for critical routes

📚 Documentation Reference

Detailed documentation is available in the docs/ directory and project reference:


🛠️ Local Development & Testing

Build from source with maturin:

# Clone the repository
git clone https://github.com/rajboopathiking/rustapi.git
cd rustapi

# Build release wheel with Maturin
pip install maturin
maturin develop --release

# Run full test suite
pytest tests/ -v

PYPI Package

pip install pyrustapi

📄 License

Distributed under the MIT License.

Metadata

Release files for pyrustapi 1.8.8

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

Source distribution (sdist)

Source distribution for pyrustapi 1.8.8
File Size Uploaded
pyrustapi-1.8.8.tar.gz 6.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyrustapi 1.8.8
File
pyrustapi-1.8.8-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
pyrustapi-1.8.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
pyrustapi-1.8.8-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
pyrustapi-1.8.8-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 23.0 MB

Release files / pyrustapi-1.8.8.tar.gz

Download URL pyrustapi-1.8.8.tar.gz
Size 6.3 MB
Tags Source
SHA-256 checksum
How to use checksums
84cb9ce6d1c244d1b00552735a514b654fcc939bcc7b54e445611e1f047bc12f
BLAKE2b-256 checksum
How to use checksums
fdbf08f2cf77d337fb8a80fe7a35fbd7741efc3d3cf513f82102e4469f40babf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / pyrustapi-1.8.8-cp38-abi3-win_amd64.whl

Download URL pyrustapi-1.8.8-cp38-abi3-win_amd64.whl
Size 4.3 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
aee1364fd8a399aa23dea49cc3c5e9bf2ca17a67b16cbc3203ee425ea73c8383
BLAKE2b-256 checksum
How to use checksums
0ab9a81389c76613fa1cbde49648ac4cfd18c7e20cd6f454448b37d701fdf93e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyrustapi-1.8.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyrustapi-1.8.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.3 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
996af9739c039d048b386fbead3fb07d49c49bbe26ff12524ca4feb03eaa40d7
BLAKE2b-256 checksum
How to use checksums
6f4037d1562e5ca36f301dfce7a6140e51d2469a01b34af4ae05d8ecf0b4a271
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyrustapi-1.8.8-cp38-abi3-macosx_11_0_arm64.whl

Download URL pyrustapi-1.8.8-cp38-abi3-macosx_11_0_arm64.whl
Size 3.9 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
aaa763fe36e434cdee8941c68bb3a980dfddff2206bcfee0cee157266eca7b4d
BLAKE2b-256 checksum
How to use checksums
71ffe3ab91b0d900d4b8f2d0100752dbfa51983c061c275b61dcb48afb9e1369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyrustapi-1.8.8-cp38-abi3-macosx_10_12_x86_64.whl

Download URL pyrustapi-1.8.8-cp38-abi3-macosx_10_12_x86_64.whl
Size 4.2 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0595121b6ac3807407478a8e08281d80af5e3c17fdbd15ec7f520837b80b6d2e
BLAKE2b-256 checksum
How to use checksums
e201463aaad74325331296df9a5c0ea62bd59be2945e5ec623394fca468751b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

1.8.9

5 release files

This release

1.8.8 This release

5 release files

1.8.6

5 release files

0.8.6

5 release files

0.3.3

5 release files

0.3.0

5 release files

0.1.33

5 release files

0.1.31

5 release files

0.1.30

5 release files

0.1.29

5 release files

0.1.28

4 release 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