--- id: airium version: "0.2.7" license: MIT license_treatment: permissive maintenance: aging --- # airium — Easy and quick html builder with natural syntax correspondence (python->html). No templates needed. Serves pure pythonic library with no dependencies. License: permissive · Maintenance: aging · Downloads: 97.0K/mo ## What it is and what it does Airium is a Python library that generates HTML by treating DOM structure as Python indentation and context managers, eliminating the need for separate template files. Instead of writing HTML templates, you write Python code where nesting is expressed through `with` statements, and element attributes and text are passed as function arguments. The library supports both pretty-printed (indented, human-readable) and minified output modes. The package also includes a reverse translator to parse existing HTML back into Python code. It has no external dependencies, works across Python 3.8 through 3.13 and PyPy, and can be integrated into web frameworks like Flask or Django to replace template engines entirely. Output can be cast to string or UTF-8 bytes directly. Use it for: - Generate HTML programmatically in Flask or Django views without writing separate template files - Build dynamic HTML tables, forms, or page structures where the layout is determined by Python logic - Create minified HTML output for production when file size matters - Convert existing HTML documents into Python code for programmatic manipulation - Generate email HTML bodies or static site content from pure Python ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Airium generates HTML from Python code using indentation and context managers instead of templates, and can also parse HTML back into Python. Yes, if you prefer writing HTML in Python over templates and want zero external dependencies. The package is stable (Beta status, no known vulnerabilities) but aging—last release was 430 days ago. Suitable for small to medium projects; verify performance and framework integration for your specific use case before adopting in production. ## Install pip install airium uv add airium poetry add airium ## Installing airium Before you install: No runtime dependencies and a pure-Python wheel distribution make installation straightforward. The package is aging (430 days since last release) but carries a Beta status and has received recent maintenance as of 2025-06-10. License in practice: MIT license is permissive, allowing free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions. Quickstart: from airium import Airium a = Airium() a('') with a.html(): with a.body(): a.h1(_t='Hello World') print(str(a)) Verify before relying: - Whether the reverse translator (HTML to Python) is production-ready or limited to specific HTML patterns - Performance characteristics when generating large or deeply nested HTML documents - Compatibility with modern web frameworks beyond the Django example shown ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 97.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags html generator python, template-less html builder, python to html converter, html to python translator, dom structure python indentation, programmatic html generation, no-template web markup, html-generation, template-free, code-generator [View on SkillFed](https://skillfed.io/packages/airium) · [View on PyPI](https://pypi.org/project/airium/)