hyperscript
HyperText with Python
Decision gist · record as of 2026-08-14
Yes, if you need lightweight programmatic HTML generation without template overhead. The package is stable, dependency-free, and permissively licensed. However, it is dormant—no active maintenance—so use it only for straightforward markup tasks where you do not expect ongoing support or feature additions. For complex templating or large-scale web applications, consider a maintained alternative.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Installation is straightforward with no runtime dependencies.
- The package is dormant—last commit was 2024-12-21 and no release since 2024-10-22—so expect no active maintenance or rapid bug fixes.
License · maintenance · safety
MIT License (permissive) — MIT License is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you retain the license notice.
last release 2024-10-22 (661 days) · last repo commit 2024-12-21 · 11 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 511,792 downloads/mo, #6,258 on PyPI
Alternatives
Verify before relying
pip install hyperscript
from hyperscript import h
print(h("p.greeting#msg", "Hello world!"))- Whether the package handles edge cases in attribute rendering (e.g., data attributes, custom namespaces) beyond the documented examples.
- Performance characteristics when generating large or deeply nested HTML structures.
- Whether there is a way to output formatted/pretty-printed HTML or only minified output.
What it is and what it does
Hyperscript is a lightweight Python library for building HTML markup using function calls rather than string concatenation or templates. You pass an element selector (tag name, optional class and id), attributes as a dictionary, and content as positional arguments, and it returns an HTML string. It supports nested elements, inline styles, boolean attributes, and class/id shorthand syntax similar to CSS selectors.
The library has no runtime dependencies and installs cleanly on Python 3.8+. It is dormant—the repository is not archived but has seen no commits since late 2024 and no releases in several months—so it is stable but not actively developed. It carries no known security vulnerabilities and is licensed under MIT, making it safe to use in most projects.
Use it for
- Generate HTML snippets programmatically in web frameworks or static site generators without writing raw HTML strings.
- Build email templates or HTML reports dynamically from Python data structures.
- Create test fixtures or mock HTML for unit tests without external template files.
- Construct simple HTML documents or fragments in CLI tools or data processing scripts.
- Prototype web page layouts in Jupyter notebooks or interactive Python environments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight programmatic HTML generation without template overhead.
The package is stable, dependency-free, and permissively licensed. However, it is dormant—no active maintenance—so use it only for straightforward markup tasks where you do not expect ongoing support or feature additions. For complex templating or large-scale web applications, consider a maintained alternative.
Install
hyperscript on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is dormant—last commit was 2024-12-21 and no release since 2024-10-22—so expect no active maintenance or rapid bug fixes.
Requires Python 3.8 or later.
License in practice
MIT License is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you retain the license notice.
Quickstart
pip install hyperscript
from hyperscript import h
print(h("p.greeting#msg", "Hello world!"))
Verify before relying
- Whether the package handles edge cases in attribute rendering (e.g., data attributes, custom namespaces) beyond the documented examples.
- Performance characteristics when generating large or deeply nested HTML structures.
- Whether there is a way to output formatted/pretty-printed HTML or only minified output.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 661 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 511,792 / month, #6,258 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Text Processing :: Markup :: HTML |
Evidence: hyperscript-0.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “html dsl python”
- hyperscriptHyperscript lets you generate HTML markup programmatically using…
- htpyhtpy lets you write HTML directly in Python using bracket syntax and…
- tilelangTilelang is a domain-specific language for writing high-performance…
Give your agent the search over MCP, or paste the wish link into any chat.
More HTML packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
See also airium · htbuilder · python-fasthtml · dominate · html5tagger · empy · htmlBuilder · tinyhtml · htmltools · Genshi