Skip to main content

FastrAPI

A high-performance Python web framework powered by Rust

Drop-in FastAPI replacement with 33x faster performance. Write familiar Python code, get Rust-powered speed.

Quick start

Get up and running with FastrAPI in minutes

1

Install FastrAPI

Install FastrAPI using pip or uv:
pip install fastrapi
Or with uv for faster installation:
uv install fastrapi
2

Create your first app

Create a new file main.py and write your first FastrAPI application:
main.py
from fastrapi import FastrAPI

app = FastrAPI()

@app.get("/hello")
def hello():
    return {"Hello": "World"}

if __name__ == "__main__":
    app.serve("127.0.0.1", 8080)
3

Run your application

Execute your application:
python main.py
Test it with curl:
curl http://127.0.0.1:8080/hello
{"Hello": "World"}

Key features

Everything you need to build high-performance APIs

Lightning fast

Up to 33x faster than FastAPI, powered by Rust and Axum

Drop-in replacement

Familiar FastAPI syntax with minimal code changes

Type safety

Inherits Rust’s robust type system for reliability

Pydantic powered

Seamless integration for request/response validation

Async native

Built on Tokio’s async runtime for maximum concurrency

Middleware support

CORS, GZip, Sessions, and custom middleware

Explore the docs

Deep dive into FastrAPI’s capabilities

Core concepts

Understand FastrAPI’s architecture and design

Guides

Step-by-step tutorials for common tasks

API reference

Complete API documentation

WebSockets

Real-time bidirectional communication

Background tasks

Execute tasks asynchronously

Dependency injection

Manage dependencies efficiently

Ready to build?

Start building high-performance APIs with FastrAPI today

Get Started