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.3.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.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thtml_tstring-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 12f1e9d9a3907e352624a4c7aab3ea52c248e3a1f43837802bfcefc44eccb277
MD5 78515ad0d732fc0af33b603e3aa1a87f
BLAKE2b-256 ded1a815fb2455341f8f9c4e2db8d7b317f125ca5aa5813af3fc05cfe978fb71

See more details on using hashes here.

Provenance

The following attestation bundles were made for thtml_tstring-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: thtml_tstring-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 44d111bf86babacce266366a1232f271d9f71856e04afc95c3649900fb68bf58
MD5 10a11c3d3e9704383b42af53dd182eb6
BLAKE2b-256 4f79ce909e84a155c48788283efdddae2e079aacb1a906e493bb6e8d3d3647f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for thtml_tstring-0.1.3-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