Air: The Modern Python Web Framework for FastAPI and Pydantic
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Air is a new Python web framework developed by the authors of "Two Scoops of Django." It leverages FastAPI, Starlette, and Pydantic to provide a fast and intuitive development experience. Designed for building both APIs and web pages, Air offers features like Air Tags for HTML generation, Jinja2 integration, and HTMX support, aiming to breathe fresh air into Python web development.
Repository Information
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Air is a new Python web framework created by the authors of "Two Scoops of Django." It aims to simplify web development by building upon popular and robust libraries like FastAPI, Starlette, and Pydantic. Air allows developers to efficiently build both RESTful APIs and dynamic web pages within a single application, offering a fresh approach to Python web development.
Installation
To get started with Air, you can install it using pip or conda:
pip install -U air
# or
conda install air -c conda-forge
For uv users, follow these steps:
uv venv
source .venv/bin/activate
uv init
uv add air
You can also install optional features (extras) to extend Air's capabilities:
# Standard extras (FastAPI’s recommended)
uv add "air[standard]"
# Pretty HTML Rendering (lxml, rich)
uv add "air[pretty]"
# SQLModel / SQLAlchemy support
uv add "air[sqlmodel]"
# OAuth clients via Authlib
uv add "air[auth]"
# All extras
uv add "air[all]"
You can combine extras in one command, for example: uv add "air[pretty,sql]".
Examples
A Simple Example
Create a main.py with:
import air
app = air.Air()
@app.get("/")
async def index():
return air.Html(air.H1("Hello, world!", style="color: blue;"))
Run the app with:
fastapi dev
If you have fastapi installed globally, you may see an error. In that case, run the app with:
uv run fastapi dev
This example uses Air Tags, which are Python classes that render as HTML. Air Tags are typed and documented, designed to work well with any code completion tool.
Combining FastAPI and Air
Air is just a layer over FastAPI, making it trivial to combine sophisticated HTML pages and a REST API into one app.
import air
from fastapi import FastAPI
app = air.Air()
api = FastAPI()
@app.get("/")
def landing_page():
return air.Html(
air.Head(air.Title("Awesome SaaS")),
air.Body(
air.H1("Awesome SaaS"),
air.P(air.A("API Docs", target="_blank", href="/api/docs")),
),
)
@api.get("/")
def api_root():
return {"message": "Awesome SaaS is powered by FastAPI"}
# Combining the Air and FastAPI apps into one
app.mount("/api", api)
Combining FastAPI and Air using Jinja2
If you prefer using Jinja2 instead of Air Tags, Air has you covered.
import air
from air.requests import Request
from fastapi import FastAPI
app = air.Air()
api = FastAPI()
# Air's JinjaRenderer is a shortcut for using Jinja templates
jinja = air.JinjaRenderer(directory="templates")
@app.get("/")
def index(request: Request):
return jinja(request, name="home.html")
@api.get("/")
def api_root():
return {"message": "Awesome SaaS is powered by FastAPI"}
# Combining the Air and and FastAPI apps into one
app.mount("/api", api)
Don't forget the Jinja template! Create a templates/home.html file with:
<!doctype html>
<html>
<head>
<title>Awesome SaaS</title>
</head>
<body>
<h1>Awesome SaaS</h1>
<p>
<a target="_blank" href="/api/docs">API Docs</a>
</p>
</body>
</html>
Using Jinja with Air is designed to be easier than with FastAPI directly.
Why use Air?
Air offers several compelling reasons for developers to choose it:
- Powered by FastAPI: Designed to work with FastAPI so you can serve your API and web pages from one app.
- Fast to code: Tons of intuitive shortcuts and optimizations designed to expedite coding HTML with FastAPI.
- Air Tags: Easy to write and performant HTML content generation using Python classes to render HTML.
- Jinja Friendly: No need to write
response_class=HtmlResponseandtemplates.TemplateResponsefor every HTML view. - Mix Jinja and Air Tags: Jinja and Air Tags both are first class citizens. Use either or both in the same view!
- HTMX friendly: We love HTMX and provide utilities to use it with Air.
- HTML form validation powered by Pydantic: Air Forms provide two ways to use Pydantic with HTML forms (dependency injection or from within views).
- Easy to learn yet well documented: Hopefully Air is so intuitive and well-typed you'll barely need to use the documentation. In case you do need to look something up we're taking our experience writing technical books and using it to make documentation worth boasting about.
Links
For more information, refer to the official documentation and source code:
- Documentation: https://airdocs.fastapicloud.dev/
- Source Code: https://github.com/feldroy/air
Related repositories
Similar repositories that may be relevant next.

agent-service-toolkit: A Comprehensive Toolkit for AI Agent Services with LangGraph
March 17, 2026
The agent-service-toolkit is a full-featured repository for building and running AI agent services. It leverages LangGraph for sophisticated agent logic, FastAPI for a robust service API, and Streamlit for an interactive chat interface. This toolkit provides a comprehensive and robust template for developing and deploying custom AI agents with ease.

langcorn: Serve LangChain LLM Apps and Agents with FastAPI
March 2, 2026
Langcorn is an innovative API server designed to effortlessly deploy LangChain models and pipelines. It leverages the high-performance FastAPI framework, offering a robust and scalable solution for serving large language model applications. With features like easy installation, built-in authentication, and support for custom API keys, Langcorn streamlines the process of bringing your LLM projects to production.

Awesome FastAPI: A Curated List of Essential FastAPI Resources
January 10, 2026
Awesome FastAPI is a comprehensive curated list of resources dedicated to the FastAPI web framework. It provides developers with a wide array of tools, extensions, and learning materials, making it an invaluable hub for anyone working with or learning FastAPI. This repository simplifies the process of discovering essential components for building high-performance Python web applications.

Bracket: A Self-Hosted Tournament System for Sports and Events
November 1, 2025
Bracket is an open-source, self-hosted tournament system designed for ease of use and flexibility. It supports single elimination, round-robin, and Swiss formats, allowing users to build complex tournament structures with multiple stages. Developed with Python (FastAPI) for the backend and Next.js with Mantine for the frontend, Bracket offers a robust solution for managing sports and other competitive events.
Source repository
Open the original repository on GitHub.