air

The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, Pydantic, and HTMX.

https://github.com/feldroy/air

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.1%) to scientific vocabulary

Keywords

fastapi pydantic python starlette web

Keywords from Contributors

interactive serializer packaging network-simulation hacking autograding observability embedded optim standardization
Last synced: 6 months ago · JSON representation

Repository

The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, Pydantic, and HTMX.

Basic Info
Statistics
  • Stars: 142
  • Watchers: 6
  • Forks: 20
  • Open Issues: 38
  • Releases: 33
Topics
fastapi pydantic python starlette web
Created about 10 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

Air 💨: The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, and Pydantic.

CI - main CI - Latest Tag codecov GitHub License

PyPI - Version PyPI Total Downloads PyPI Monthly Downloads PyPI Weekly Downloads

Running on Windows macOS Ubuntu Python Versions

GitHub commit activity GitHub commits since latest release GitHub last commit GitHub Release Date

GitHub contributors Discord X Bluesky MkDocs

Frameworks FastAPI Pydantic Jinja Astral

[!CAUTION] Air is currently in an alpha state. While breaking changes are becoming less common, nevertheless, anything and everything could change.

[!IMPORTANT] If you have an idea for a new feature, discuss it with us by opening an issue before writing any code. Do understand that we are working to remove features from core, and for new features you will almost always create your own package that extends or uses Air instead of adding to this package. This is by design, as our vision is for the Air package ecosystem to be as much a "core" part of Air as the code in this minimalist base package.

Why use Air?

  • 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=HtmlResponse and templates.TemplateResponse for 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 - We love using pydantic to validate incoming data. 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

Documentation: https://airdocs.fastapicloud.dev

Source Code: https://github.com/feldroy/air

Installation

Install using pip install -U air or conda install air -c conda-forge.

For uv users, just create a virtualenv and install the air package, like:

sh uv venv source .venv/bin/activate uv add air uv add "fastapi[standard]"

A Simple Example

Create a main.py with:

```python import air

app = air.Air()

@app.get("/") async def index(): return air.Html(air.H1("Hello, world!", style="color: blue;")) ```

Run the app with:

sh fastapi dev

[!NOTE] 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. You can also run this with uv run uvicorn main:app --reload if you prefer using Uvicorn directly.

Then open your browser to http://127.0.0.1:8000 to see the result.

Combining FastAPI and Air

Air is just a layer over FastAPI. So it is trivial to combine sophisticated HTML pages and a REST API into one app.

```python import air from fastapi import FastAPI

app = air.Air() api = FastAPI()

@app.get("/") def landingpage(): 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 and FastAPI apps into one

app.mount("/api", api) ```

Combining FastAPI and Air using Jinja2

Want to use Jinja2 instead of Air Tags? We've got you covered.

```python 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!

html <!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>

[!NOTE] Using Jinja with Air is easier than with FastAPI. That's because as much as we enjoy Air Tags, we also love Jinja!

Contributing

For guidance on setting up a development environment and how to make a contribution to Air, see Contributing to Air.

Owner

  • Name: Feldroy
  • Login: feldroy
  • Kind: organization
  • Email: hello@feldroy.com
  • Location: United States of America

The little creative company behind Two Scoops Press, Beyond Reality Books, and Fuzzy Rainbow. Best known for writing Two Scoops of Django and Cookiecutter.

GitHub Events

Total
  • Create event: 157
  • Release event: 22
  • Issues event: 190
  • Watch event: 88
  • Delete event: 138
  • Member event: 2
  • Issue comment event: 127
  • Push event: 607
  • Pull request review comment event: 72
  • Pull request review event: 112
  • Pull request event: 288
  • Fork event: 12
Last Year
  • Create event: 157
  • Release event: 22
  • Issues event: 190
  • Watch event: 88
  • Delete event: 138
  • Member event: 2
  • Issue comment event: 127
  • Push event: 607
  • Pull request review comment event: 72
  • Pull request review event: 112
  • Pull request event: 288
  • Fork event: 12

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 104
  • Total Committers: 5
  • Avg Commits per committer: 20.8
  • Development Distribution Score (DDS): 0.452
Past Year
  • Commits: 79
  • Committers: 4
  • Avg Commits per committer: 19.75
  • Development Distribution Score (DDS): 0.278
Top Committers
Name Email Commits
Daniel Roy Greenfeld d****l@f****m 57
Audrey M. Roy Greenfeld a****y@f****m 35
Isaac Flath I****h@g****m 7
dependabot[bot] 4****] 4
John Franey 1****y 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 115
  • Total pull requests: 176
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 19 hours
  • Total issue authors: 7
  • Total pull request authors: 14
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.36
  • Merged pull requests: 109
  • Bot issues: 1
  • Bot pull requests: 20
Past Year
  • Issues: 115
  • Pull requests: 173
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 19 hours
  • Issue authors: 7
  • Pull request authors: 14
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.36
  • Merged pull requests: 108
  • Bot issues: 1
  • Bot pull requests: 20
Top Authors
Issue Authors
  • pydanny (105)
  • tallerasaf (4)
  • Isaac-Flath (2)
  • Fflath (1)
  • treyhunner (1)
  • renatooliveira (1)
  • renovate[bot] (1)
Pull Request Authors
  • pydanny (105)
  • tallerasaf (23)
  • dependabot[bot] (18)
  • audreyfeldroy (12)
  • mecit-san (4)
  • Isaac-Flath (3)
  • WatanabeChika (2)
  • vanessapigwin (2)
  • renovate[bot] (2)
  • dfundako (1)
  • kmehran1106 (1)
  • XueSongTap (1)
  • Akhilanandateja (1)
  • johnfraney (1)
Top Labels
Issue Labels
feature (36) Air Tags (20) docs (17) python (11) bug (10) enhancement (4) dependencies (3) github_actions (2) good first issue (2) refactor (2) duplicate (1) help wanted (1)
Pull Request Labels
python (34) feature (28) Air Tags (23) docs (23) upgrade (14) dependencies (13) bug (11) deps (8) enhancement (7) uv (7) github_actions (6) dependabot (6) refactor (5) Status: Review Needed 💬 (3) Status: Mergable ✅ (2) Status: Do Not Merge! ❌ (2) Status: Approved! 👍 (1) actions (1) help wanted (1) renovate (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 3,045 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 4
  • Total versions: 37
  • Total maintainers: 2
pypi.org: air

The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, and Pydantic.

  • Homepage: https://github.com/feldroy/air
  • Documentation: https://air.readthedocs.io/
  • License: MIT License Copyright (c) 2025 Daniel and Audrey Roy Greenfeld Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.27.2
    published 6 months ago
  • Versions: 37
  • Dependent Packages: 0
  • Dependent Repositories: 4
  • Downloads: 3,045 Last month
Rankings
Dependent repos count: 7.5%
Dependent packages count: 10.0%
Average: 19.8%
Forks count: 29.8%
Stargazers count: 31.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

requirements_dev.txt pypi
  • PyYAML ==3.11 development
  • Sphinx ==1.3.1 development
  • bumpversion ==0.5.3 development
  • coverage ==4.0 development
  • cryptography ==1.0.1 development
  • flake8 ==2.4.1 development
  • tox ==2.1.1 development
  • watchdog ==0.8.3 development
  • wheel ==0.23.0 development
setup.py pypi