Registry / web-framework / htag
library2.0.27pypypi✓ verified 79d ago

htag is a Python GUI toolkit for building beautiful applications for mobile, web, and desktop from a single codebase, using a reactive component model similar to React. Version 2.0.27 runs on Python >= 3.10. It is actively maintained with regular releases.

pip install htag
INSTALL
IMPORT
SIG · HTAG
H
htag
web-frameworkpythonv2.0.27
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

App
from htag import App
from htag import HTag
Tag
from htag import Tag
Router
from htag import Router

Create a simple app that displays 'Hello World!' in the browser.

from htag import HTag class MyApp(HTag): def init(self): self += "Hello World!" if __name__ == "__main__": from htag.runners import BrowserHTTP BrowserHTTP(MyApp).run()
Debug
Known issues
breakinghtag 2.0 dropped the old imperative API. The `HTag` class now uses a reactive pattern; components must override `init()` instead of `__init__`.
fix
Migrate components to subclass `HTag` and define `def init(self):` instead of `__init__`.
affects: 2.0.0+
breakingThe `run()` method signature changed. In htag 2.x, runners require an explicit import from `htag.runners`.
fix
Replace `HTag.run()` with explicit runner import, e.g., `from htag.runners import BrowserHTTP`.
affects: 2.0.0+
gotchaEvent handlers must be defined as methods of the HTag subclass, not as standalone functions or lambdas in some contexts.
fix
Define event handlers inside the class; use `self.bind(event, handler)` or decorate with `@HTag.event`.
affects: >=1.0
Upgrade
Version history
2.0.27latest on PyPI · released Apr 26, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
htag — pip install htag · libregistry