air: Build Python Web Apps with HTML and FastAPI

Summary
Air is a Python web framework for building HTML pages alongside FastAPI APIs. It offers typed Python HTML elements, Jinja templates, and HTMX utilities, with an API designed to be clear to both developers and AI coding assistants.
At a glance
- Language
- Python
- License
- MIT
- Stars
- 920
- Forks
- 100
- Added to OSRepos
- November 6, 2025
- Last analyzed
- October 3, 2026
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.
Overview
Air is a Python framework for creating server-rendered web pages and APIs in one application. Built on FastAPI, Pydantic, and HTMX, it addresses the friction of returning HTML from FastAPI by providing page helpers, a Jinja renderer, and Python classes for composing HTML.
It is aimed at developers who prefer explicit, typed interfaces and want AI coding assistants to work from code and docstrings rather than relying on hidden conventions. Air is most relevant for new Python web projects that need both conventional HTML pages and API endpoints.
Key Features
- Define page routes with
@app.pageand return HTML directly. - Build markup with typed Python HTML classes, or render existing Jinja templates.
- Combine Air pages and FastAPI routes in one app, including mounted FastAPI sub-apps.
- Use FastAPI capabilities such as OpenAPI documentation, response models, and WebSockets alongside pages.
- Validate HTML form input with Pydantic using Air Forms.
- Use utilities designed to work with HTMX.
- Provides in-source types and documentation intended to make the API understandable to AI coding tools.
Use Cases
- Build a server-rendered site in Python when you want HTML pages without setting up a separate frontend application.
- Add web pages to an existing FastAPI service while retaining its API routes and tooling.
- Develop form-heavy applications where Pydantic validation can be shared with Python code.
- Prototype pages from HTML mockups using Jinja, then use Python-generated markup where typed editor support is useful.
Project Facts
- Language: Python
- License: MIT
- Stars: 920
- Forks: 100
- Topics: ai, fastapi, pydantic, python, starlette, web
- Archived: No
Getting Started
Install Air with uv:
uv add air
For setup options and examples, see the README and documentation.
Alternatives
- Masonite: Masonite is a broader Python web framework with built-in ORM, mail, queues, and scheduling, rather than a FastAPI-focused framework for typed HTML and HTMX.
Considerations
- The README identifies Air as alpha and warns that APIs may change between releases.
- Air is built on FastAPI and Pydantic, so it is best suited to teams working in Python and comfortable with that ecosystem.
- The project keeps its core intentionally minimal. The README recommends discussing feature ideas in an issue and notes that additional features may belong in separate ecosystem packages.
- AI-assisted development is a design goal, not a requirement; the framework can also be used directly by developers.
Source repository
Open the original repository on GitHub.
20 counted GitHub visits
Related repositories
Similar repositories that may be relevant next.

web-design: A Claude Code SKILL for Spec-First Web Page Design
October 3, 2026
The web-design project is a Claude Code SKILL designed to streamline the creation of beautiful and consistent web pages. It emphasizes a 'spec first, code second' approach, ensuring design principles are established before development begins. This tool helps generate UI, visuals, motion, and responsiveness that are consistent across pages and easily editable.

OOMWOO: Build Your Own Open-Source, Hackable Robot Vacuum Cleaner
October 2, 2026
OOMWOO is an ambitious open-source project enabling users to build their own robot vacuum cleaner using Raspberry Pi, 3D printing, and ROS2. It emphasizes local operation, hackability, and integration with Home Assistant, providing a high-quality, customizable home appliance. This project aims to deliver a fully open hardware, software, and firmware solution for autonomous home cleaning.

Shepherd: Reversible Execution Traces for Programmable Meta-Agents
October 2, 2026
Shepherd is a Python runtime substrate designed for agent work requiring inspection, reversibility, and supervision. It records agent runs as durable, inspectable execution traces, enabling meta-agents to observe, fork, replay, and revert any operation. This framework couples agents and environments using a copy-on-write fork, offering significant performance benefits and robust permission enforcement.

Agent Anvil: CI-First Evaluation Harness for Tool-Using AI Agents
October 1, 2026
Agent Anvil is a robust, CI-first evaluation harness designed for AI agents that utilize tools. It meticulously runs scenario suites, captures detailed traces of agent behavior, and provides semantic grading to identify issues. The platform excels at clustering failures and suggesting concrete fixes for prompts, tools, and guardrails, ensuring agents behave safely and effectively.