Air: An Archived Python Web Framework

· Air

3 min read Original article ↗

AI-First · Human-Writable · Python

The first web framework designed for AI to write.

After AI writes your app, you’re the one who has to read and maintain it. We built Air with that moment in mind.

Ask AI for a contact form. How much code do you have to read before you can tell what happens when someone clicks Submit?

With Air, you could put the route, the form, and the markup in one Python file and let HTMX handle the browser interaction. You could follow the whole thing from top to bottom.

This is the whole app.

Here’s “Hello, Air” in Air Tags and Jinja.

import air app = air.Air() @app.page def index(): return air.H1("Hello, Air")

# main.py import air from air.requests import Request app = air.Air() jinja = air.JinjaRenderer(directory="templates") @app.get("/") def index(request: Request): return jinja(request, name="index.html")

<!-- templates/index.html --> <h1>Hello, Air</h1>

Run it: air run

What made Air AI-first.

We made these choices to help AI generate better code and make that code easier for people to review.

Comprehensive docstrings

We put parameter descriptions and working examples in the docstrings so AI tools could learn how to use Air from the source itself.

Python tooling for generated code

We made Air Tags ordinary Python so you could use the same formatters, linters, and type checkers on generated code that you used on handwritten code.

Two paths to HTML

You could write HTML in Python with Air Tags, or ask AI for an HTML page and drop it into a Jinja template. We built both approaches into Air.

Predictable patterns

We named Air Tags after the HTML elements they produced so people and AI tools could tell what the Python would render. air.H1("text") renders an <h1>.

More functionality in less code

A small Air app could keep its routes and markup in one file. That gave AI fewer files to coordinate and gave you less code to review.

From Manila to Davao and back.

Air started in Manila. At two Python conferences in the Philippines, developers sat down with us to work on the framework and try it on their own apps.

PyCon Davao · 2025

Fifty developers filled the room for the Air and pandas sprint. People dug into Air’s core and sent us pull requests.

PythonAsia, Manila · 2026

This time, we asked people to build web apps with Air. Their feedback showed us where a real app took more work than our examples suggested.

Built on proven foundations

FastAPI Starlette Pydantic HTMX Uvicorn

Explore the archive

Find the source code, release history, and documentation on GitHub.