Skip to main content

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>", registry={"Button": Button})
assert page.render() == '<button class="primary">Save</button>'

Metadata

Release files for thtml-tstring 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thtml-tstring 0.2.1
File Size Uploaded
thtml_tstring-0.2.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thtml-tstring 0.2.1
File Interpreter ABI Platform
thtml_tstring-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / thtml_tstring-0.2.1.tar.gz

Download URL thtml_tstring-0.2.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
986521198f942e9867fcf5c45b7251fe7963e48597301997b21c7330ee1cef2f
BLAKE2b-256 checksum
How to use checksums
0e100c5860bd52cadc3220aad1a19e5d70bada6c6f8b86f6c6cfb71e5178e843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Release files / thtml_tstring-0.2.1-py3-none-any.whl

Download URL thtml_tstring-0.2.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1736722815c9096512e5111df52b68546ceb18fe6f83148952474998c5e7b2df
BLAKE2b-256 checksum
How to use checksums
cfb032c93c2b36dfdcc7fa2292ea3ad68578cf295385269871e7fe787720a94e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page