{"id":30269408,"url":"https://github.com/feldroy/air","last_synced_at":"2025-12-27T06:53:51.226Z","repository":{"id":53535721,"uuid":"47806393","full_name":"feldroy/air","owner":"feldroy","description":"The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, Pydantic, and HTMX.","archived":false,"fork":false,"pushed_at":"2025-08-12T04:53:30.000Z","size":1634,"stargazers_count":92,"open_issues_count":29,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-12T11:30:20.540Z","etag":null,"topics":["fastapi","pydantic","python","starlette","web"],"latest_commit_sha":null,"homepage":"https://airdocs.fastapicloud.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feldroy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-12-11T05:08:09.000Z","updated_at":"2025-08-12T04:53:09.000Z","dependencies_parsed_at":"2023-12-13T05:32:27.428Z","dependency_job_id":"8acb0898-8c99-4aa3-8229-0e39bd766efc","html_url":"https://github.com/feldroy/air","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"56bece511e64befb54c1cf89fe6785bd6a9cd55e"},"previous_names":["audreyr/air","audreyfeldroy/air"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/feldroy/air","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feldroy%2Fair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feldroy%2Fair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feldroy%2Fair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feldroy%2Fair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feldroy","download_url":"https://codeload.github.com/feldroy/air/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feldroy%2Fair/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270142449,"owners_count":24534539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","pydantic","python","starlette","web"],"created_at":"2025-08-16T02:01:28.727Z","updated_at":"2025-12-27T06:53:51.220Z","avatar_url":"https://github.com/feldroy.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/feldroy/air/refs/heads/main/img/air-neon.svg\" /\u003e\n\u003c/p\u003e\n\n## Air 💨: The new web framework that breathes fresh air into Python web development. Built with FastAPI, Starlette, and Pydantic.\n\n[![CI - main](https://img.shields.io/github/actions/workflow/status/feldroy/air/CI.yaml?branch=main\u0026logo=githubactions\u0026label=CI)](https://github.com/feldroy/air/actions/workflows/CI.yaml?query=branch%3Amain+event%3Apush)\n[![CI - Latest Tag](https://img.shields.io/github/check-runs/feldroy/air/latest?logo=githubactions\u0026label=CI%20Tag)](https://github.com/feldroy/air/actions/workflows/python-package.yml?query=tag%3Alatest+event%3Apush)\n[![codecov](https://codecov.io/gh/feldroy/air/graph/badge.svg?token=928SXPA1SU)](https://codecov.io/gh/feldroy/air)\n[![GitHub License](https://img.shields.io/github/license/feldroy/air?logo=github\u0026label=License)](https://github.com/feldroy/air/blob/main/LICENSE)\n\n[![PyPI - Version](https://img.shields.io/pypi/v/air?logo=pypi\u0026label=Pypi\u0026logoColor=fff)](https://pypi.org/project/air)\n[![PyPI Total Downloads](https://static.pepy.tech/badge/air)](https://pepy.tech/projects/air)\n[![PyPI Monthly Downloads](https://static.pepy.tech/badge/air/month)](https://pepy.tech/projects/air)\n[![PyPI Weekly Downloads](https://static.pepy.tech/badge/air/week)](https://pepy.tech/projects/air)\n\n![Running on](https://img.shields.io/badge/Running%20on:-magenta?labelColor=black\u0026logo=hotwire\u0026logoColor=yellow)\n![Windows](https://custom-icon-badges.demolab.com/badge/Windows%2011-%230079d5?logo=windows11\u0026logoColor=white)\n![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple\u0026logoColor=white\u0026color=2e2e2e)\n![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu\u0026logoColor=white\u0026color=orange)\n[![Python Versions](https://img.shields.io/pypi/pyversions/air?logo=python\u0026logoColor=fff\u0026label=Python)](https://pypi.org/project/air)\n\n![GitHub commit activity](https://img.shields.io/github/commit-activity/t/feldroy/air?logo=github\u0026label=Commits)\n![GitHub commits since latest release](https://img.shields.io/github/commits-since/feldroy/air/latest?logo=github)\n[![GitHub last commit](https://img.shields.io/github/last-commit/feldroy/air?logo=github\u0026label=Last%20Commit)](https://github.com/feldroy/air/commit/main)\n[![GitHub Release Date](https://img.shields.io/github/release-date/feldroy/air?logo=github\u0026label=Release%20Date)](https://github.com/feldroy/air/releases/latest)\n\n[![GitHub contributors](https://img.shields.io/github/contributors/feldroy/air?logo=github\u0026label=Contributors)](https://github.com/feldroy/air/graphs/contributors)\n[![Discord](https://img.shields.io/discord/1388403469505007696?logo=discord\u0026label=Discord)](https://discord.gg/znf8vPsz47)\n[![X](https://img.shields.io/badge/Air%20💨-%23000000.svg?logo=X\u0026logoColor=white)](https://x.com/AirWebFramework)\n[![Bluesky](https://img.shields.io/badge/Air%20💨-0285FF?logo=bluesky\u0026logoColor=fff)](https://bsky.app/profile/airwebframework.bsky.social)\n[![MkDocs](https://img.shields.io/badge/MkDocs-526CFE?logo=materialformkdocs\u0026logoColor=fff)](https://feldroy.github.io/air)\n\n![Frameworks](https://img.shields.io/badge/Frameworks:-magenta?labelColor=black\u0026logo=framework\u0026logoColor=yellow)\n[![FastAPI](https://img.shields.io/badge/FastAPI-009485.svg?logo=fastapi\u0026logoColor=white)](https://fastapi.tiangolo.com)\n[![Pydantic](https://img.shields.io/badge/Pydantic-1B0613.svg?logo=pydantic\u0026logoColor=E35AF3)](https://docs.pydantic.dev/latest)\n[![Jinja](https://img.shields.io/badge/jinja-white.svg?\u0026logo=Jinja\u0026logoColor=black)](https://jinja.palletsprojects.com/en/latest)\n[![Astral](https://img.shields.io/badge/uv|ruff|ty-black.svg?logo=astral\u0026logoColor=D1FF4F)](https://docs.astral.sh)\n\n---\n\n\u003e [!CAUTION]\n\u003e Air is currently in an alpha state. While breaking changes are becoming less common, nevertheless, anything and everything could change.\n\n\n\u003e [!IMPORTANT]\n\u003e 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.\n\n## Why use Air?\n\n- **Powered by FastAPI** - Designed to work with FastAPI so you can serve your API and web pages from one app\n- **Fast to code** - Tons of intuitive shortcuts and optimizations designed to expedite coding HTML with FastAPI\n- **Air Tags** - Easy to write and performant HTML content generation using Python classes to render HTML\n- **Jinja Friendly** - No need to write `response_class=HtmlResponse` and `templates.TemplateResponse` for every HTML view\n- **Mix Jinja and Air Tags** - Jinja and Air Tags both are first class citizens. Use either or both in the same view!\n- **HTMX friendly** - We love HTMX and provide utilities to use it with Air\n- **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)\n- **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\n\n---\n\n**Documentation**: \u003ca href=\"https://airdocs.fastapicloud.dev/\" target=\"_blank\"\u003ehttps://airdocs.fastapicloud.dev\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/feldroy/air\" target=\"_blank\"\u003ehttps://github.com/feldroy/air\u003c/a\u003e\n\n## Installation\n\nInstall using `pip install -U air` or `conda install air -c conda-forge`.\n\nFor `uv` users, just create a virtualenv and install the air package, like:\n\n```sh\nuv venv\nsource .venv/bin/activate\nuv init\nuv add air\n```\n\n### Install optional features (with `uv add`)\n\nYou can install each optional feature (extras) like this:\n\n1. **Standard** — FastAPI’s recommended extras\n   ```sh\n   uv add \"air[standard]\"\n   ```\n\n## Agentic Coding\n\nThe library and its dependencies are available through [Context7](https://context7.com/feldroy/air).\nFor effective AI assistance, register the Context7 MCP server in your coding environment and configure your agent to use\nit.\n\nYou can also use:\n\n- [Code Wiki by Google](https://codewiki.google/github.com/feldroy/air)\n- [DeepWiki powered by Devin](https://deepwiki.com/feldroy/air)\n\nFor the canonical long-form context, please use: [llms-full.txt](https://feldroy.github.io/air/llms-full.txt), it\nfollows the [llmstxt](https://llmstxt.org/#format) format.\n\n## A Simple Example\n\nCreate a `main.py` with:\n\n```python\nimport air\n\napp = air.Air()\n\n\n@app.get(\"/\")\nasync def index():\n    return air.Html(air.H1(\"Hello, world!\", style=\"color: blue;\"))\n```\n\nRun the app with:\n\n```sh\nfastapi dev\n```\n\nIf you have fastapi installed globally, you may see an error:\n\n```sh\nTo use the fastapi command, please install \"fastapi[standard]\":\n\n\tpip install \"fastapi[standard]\"\n```\n\nIn that case, run the app with:\n\n```sh\nuv run fastapi dev\n```\n\n\u003e [!NOTE]\n\u003e 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.\n\u003e You can also run this with `uv run uvicorn main:app --reload` if you prefer using Uvicorn directly.\n\nThen open your browser to \u003chttp://127.0.0.1:8000\u003e to see the result.\n\n## Combining FastAPI and Air\n\nAir is just a layer over FastAPI. So it is trivial to combine sophisticated HTML pages and a REST API into one app.\n\n```python\nimport air\nfrom fastapi import FastAPI\n\napp = air.Air()\napi = FastAPI()\n\n\n@app.get(\"/\")\ndef landing_page():\n    return air.Html(\n        air.Head(air.Title(\"Awesome SaaS\")),\n        air.Body(\n            air.H1(\"Awesome SaaS\"),\n            air.P(air.A(\"API Docs\", target=\"_blank\", href=\"/api/docs\")),\n        ),\n    )\n\n\n@api.get(\"/\")\ndef api_root():\n    return {\"message\": \"Awesome SaaS is powered by FastAPI\"}\n\n\n# Combining the Air and FastAPI apps into one\napp.mount(\"/api\", api)\n```\n\n## Combining FastAPI and Air using Jinja2\n\nWant to use Jinja2 instead of Air Tags? We've got you covered.\n\n```python\nimport air\nfrom air.requests import Request\nfrom fastapi import FastAPI\n\napp = air.Air()\napi = FastAPI()\n\n# Air's JinjaRenderer is a shortcut for using Jinja templates\njinja = air.JinjaRenderer(directory=\"templates\")\n\n\n@app.get(\"/\")\ndef index(request: Request):\n    return jinja(request, name=\"home.html\")\n\n\n@api.get(\"/\")\ndef api_root():\n    return {\"message\": \"Awesome SaaS is powered by FastAPI\"}\n\n\n# Combining the Air and and FastAPI apps into one\napp.mount(\"/api\", api)\n```\n\nDon't forget the Jinja template!\n\n```html\n\u003c!doctype html\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eAwesome SaaS\u003c/title\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003ch1\u003eAwesome SaaS\u003c/h1\u003e\n        \u003cp\u003e\n            \u003ca target=\"_blank\" href=\"/api/docs\"\u003eAPI Docs\u003c/a\u003e\n        \u003c/p\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003e [!NOTE]\n\u003e Using Jinja with Air is easier than with FastAPI. That's because as much as we enjoy Air Tags, we also love Jinja!\n\n## Sponsors\n\nMaintenance of this project is made possible by all\nthe [contributors](https://github.com/feldroy/air/graphs/contributors)\nand [sponsors](https://github.com/sponsors/feldroy).\nIf you would like to support this project and have your avatar or company logo appear below,\nplease [sponsor us](https://github.com/sponsors/feldroy). 💖💨\n\n\u003c!-- SPONSORS --\u003e\n\n\u003c!-- SPONSORS --\u003e\n\nConsider this low-barrier form of contribution yourself.\nYour [support](https://github.com/sponsors/feldroy) is much appreciated.\n\n## Contributing\n\nFor guidance on setting up a development environment and how to make a contribution to Air,\nsee [Contributing to Air](https://github.com/feldroy/air/blob/main/CONTRIBUTING.md).\n\n## Contributors\n\nThanks to all the contributors to the Air 💨 web framework!\n\n\u003ca href=\"https://github.com/feldroy/air/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=feldroy/air\" /\u003e\n\u003c/a\u003e\n\n## PyPI Stats\n\n- [pypistats](https://pypistats.org/packages/air)\n- [libraries.io](https://libraries.io/pypi/air)\n- [deps.dev](https://deps.dev/pypi/air)\n- [PePy](https://pepy.tech/projects/air)\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/#feldroy/air\u0026type=date\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=feldroy/air\u0026type=date\u0026theme=dark\u0026legend=top-left\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=feldroy/air\u0026type=date\u0026legend=top-left\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=feldroy/air\u0026type=date\u0026legend=top-left\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n","funding_links":["https://github.com/sponsors/feldroy"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeldroy%2Fair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeldroy%2Fair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeldroy%2Fair/lists"}