feldroy/air
The first web framework designed for AI to write. Built on Python, FastAPI, Pydantic, and HTMX. By the authors of Two Scoops of Django.
What it solves
Air is a web framework designed specifically to be written by AI coding assistants. It removes implicit behaviors and "magic" that often confuse LLMs, providing a fully typed API with comprehensive in-source documentation so that AI agents can understand and use the framework without needing external documentation.
How it works
Built on top of FastAPI, Pydantic, and HTMX, Air allows developers to build web pages using two primary methods:
- HTML-first: Use Jinja templates to render HTML mockups.
- Python-first: Use "Air Tags" (typed Python classes) to generate HTML content directly in Python code, enabling autocomplete and type-checking.
It integrates seamlessly with FastAPI, allowing a single project to serve both a REST API and HTML web pages. It also uses Pydantic for HTML form validation.
Who it’s for
Web developers and AI-assisted developers who want to build fast, typed web applications using Python, FastAPI, and HTMX, specifically optimized for AI-driven development workflows.
Highlights
- AI-Optimized API: Fully typed and documented in-source for better LLM understanding.
- FastAPI Integration: Leverages FastAPI's routing and capabilities while adding HTML tools.
- HTMX Friendly: Includes utilities specifically for integrating with HTMX.
- Dual Rendering: Supports both Jinja templates and Python-based HTML generation (Air Tags).
- Pydantic Validation: Uses Pydantic for robust HTML form validation.
Related
- Project
- Project
- Project
- Project
- Project