Registry / web-framework / airium

airium

JSON →
library0.2.7pypypi✓ verified 84d ago

Airium is a Python library for building HTML with natural syntax correspondence (python -> html). It requires no templates and has no dependencies. Current version is 0.2.7, with infrequent releases.

pip install airium
INSTALL
IMPORT
SIG · AIRIUM
A
airium
web-frameworkpythonv0.2.7
Install
1.6s avg
Import
50ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.056s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.044s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Airium
from airium import Airium

Create an Airium instance, use context managers for tags, and convert to string.

from airium import Airium a = Airium() with a.html(): with a.body(): a.h1('Hello, World!') result = str(a) print(result)
Debug
Known issues
gotchaAirium uses context managers for nested HTML structure; forgetting to use 'with' for tags that contain children leads to incorrect HTML (tags will self-close or produce unexpected output).
fix
Always use 'with' statements for tags that should enclose other elements (e.g., with a.div(): ...).
affects: all
gotchaAirium does not validate attribute names; typos in attribute names are silently ignored and not rendered in output.
fix
Double-check attribute names; refer to HTML spec for standard attributes.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'airium' from 'airium'
Incorrect import: trying to import the module name instead of the class.
fix
Use 'from airium import Airium' instead of 'import airium' or 'from airium import airium'.
AttributeError: 'Airium' object has no attribute 'html'
Using method calls without context manager; the html() method must be called with 'with' to generate the doctype and root element.
fix
Use 'with a.html():' to start the document, then nest other tags inside.
Upgrade
Version history
0.2.7latest on PyPI · released Jun 10, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
34
OpenAI (training)
1
Resources
airium — pip install airium · libregistry