air
The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, Pydantic, and HTMX.
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
Keywords from Contributors
Repository
The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, Pydantic, and HTMX.
Basic Info
- Host: GitHub
- Owner: feldroy
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://airdocs.fastapicloud.dev
- Size: 2 MB
Statistics
- Stars: 142
- Watchers: 6
- Forks: 20
- Open Issues: 38
- Releases: 33
Topics
Metadata Files
README.md
Air 💨: The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, and Pydantic.
[!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=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 - 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 --reloadif 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
- Website: https://www.feldroy.com/
- Repositories: 15
- Profile: https://github.com/feldroy
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
Top Committers
| Name | 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
Pull Request Labels
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
Rankings
Dependencies
- 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