Skip to content

Latest commit

ย 

History

71 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

fast-routes

Generate typed HTTP clients from FastAPI apps automatically.
This library inspects your FastAPI app and produces a fully usable async client with request/response models โ€” ideal for service-to-service communication or rapid prototyping.


๐Ÿš€ Features

  • Extracts all FastAPI routes.
  • Generates:
    • Request/response models
    • Method handlers (with typed parameters)
    • A reusable HTTP client class
  • Provides a download endpoint (/fastroutes) and a CLI tool to fetch generated code.

๐Ÿ“ฆ Installation

pip install git+https://github.com/draew6/fastroutes

๐Ÿ› ๏ธ Usage

1. Add FastRoutes to your FastAPI app:

from fastapi import FastAPI
from fastroutes import FastRoutes

app = FastAPI()
FastRoutes(app, name="MyVeryNiceClient").add_route_to_fastapi()

This will add a /fastroutes endpoint that servers your generated client code.

2. Download the generated client code:

fastroutes http://localhost:8000/fastroutes output_file.py

This will save the generated code to output_file.py.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages