Skip to main content

T-HTML renderer for PEP 750 template strings

Project description

thtml-tstring

Higher-level T-HTML renderer for PEP 750 template strings.

from thtml_tstring import component, thtml

@component
def Button(*, children: str, kind: str = "primary"):
    classes = [kind]
    return t'<button class="{classes}">{children}</button>'

label = "Save"
page = thtml(t"<Button kind='primary'>{label}</Button>")
assert page.render() == '<button class="primary">Save</button>'

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

thtml_tstring-0.1.4.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

thtml_tstring-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file thtml_tstring-0.1.4.tar.gz.

File metadata

  • Download URL: thtml_tstring-0.1.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for thtml_tstring-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4afcd33817c72d6f0f1be37395bdd2e3073365304c74a2b1a2c28a121f76806e
MD5 a6fb7ff296bc2691e61b951e0d3be7e2
BLAKE2b-256 7da93e90918140f62156a594ca6cb4b01fdc9ec5abe900c51a7cf860004cce9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for thtml_tstring-0.1.4.tar.gz:

Publisher: publish-python.yml on koxudaxi/tstring-html

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thtml_tstring-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: thtml_tstring-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for thtml_tstring-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8319013b82916125e029b0ac8a3ea66cd6360dc08ae549e66e935337bd83f8
MD5 506fd939dbc2dc5fecd4d2de6b1465ca
BLAKE2b-256 c3d5fd4650a3701297146ccba5e3ac234547c218af8156abb9bf27a5ad7aea7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for thtml_tstring-0.1.4-py3-none-any.whl:

Publisher: publish-python.yml on koxudaxi/tstring-html

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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