Skip to main content

concise html/svg tag generation

Project description

html-tags

PyPI version

[!WARNING] Under active development — Mar 2026

Concise, immutable HTML/SVG generation for Python.

from html_tags import setup_tags, setup_svg
setup_tags(); setup_svg()

page = Html(
    Head(Title("hello")),
    Body(
        H1("hello world", cls="title"),
        Svg(Circle(cx="50", cy="50", r="40")),
    )
)

Tags are immutable — call to add children or attributes:

Div(cls="card")("content", id="main")

SVG elements self-close correctly (<line />) and shapes like Circle accept children for animations.

Datastar SSE helpers included:

from html_tags import patch_elements, patch_signals, datastar_stream

Install

pip install html-tags

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

html_tags-0.0.14.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

html_tags-0.0.14-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file html_tags-0.0.14.tar.gz.

File metadata

  • Download URL: html_tags-0.0.14.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for html_tags-0.0.14.tar.gz
Algorithm Hash digest
SHA256 5fa37afdce107de97bf80ac082588f8d18bd0e693d018c2efb9b56ba5460b4ee
MD5 b860edf9bb2f3d1f838bd21b87bf5815
BLAKE2b-256 6551f8db6c2f7112366cdb551294ce4b3da04f9691b5461aa652e62d4d4d2735

See more details on using hashes here.

File details

Details for the file html_tags-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: html_tags-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for html_tags-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 87b14386d1c45b066597fbcdbdee150e981f0293e20ec897efc077bb4faadc70
MD5 12f1afa4c843b128a1eb59f9872454cc
BLAKE2b-256 9ba7f15e195a859dc9ff895957fe7b94585ae86ada0d8bd499b3774eb09e6ab2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page