Skip to main content

Add your description here

Project description

⏩ Shift: an experimental HTML renderer

username = 'Jane'
user_img = 'https://example.com/photo.jpg
todos = [
    "Invent new traffic lights",
    "Rehearse a movie scene",
    "Improve the spectrum technology",
]

html = shift(
    h1 >> t"{username}'s Todos",
    img @ {"src": user_img, "alt": username, "class": "photo"},
    ul >> (li >> todo for todo in todos),
    div >> (
        span @ {"class": "username"} >> username
        p >> "lots of long text, blah blah"
    ),
    defer(
        div >> t"Slow to load count: {lambda: click_count()}"
        loading=(div >> "Loading...")
    )
    button(hx_post="/clicked", hx_swap="outerHTML") >> "Click me"
)

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

shifthtml-0.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

shifthtml-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file shifthtml-0.1.0.tar.gz.

File metadata

  • Download URL: shifthtml-0.1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for shifthtml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8054d350a9b063f79c4ae9203675793a065d00f58c8d19ec8884f6735f2f7943
MD5 c81711df06d461621afadb5abbbd55c6
BLAKE2b-256 a7ade0fcd7ce6b9548a6c63a14d3abb91181b356d6cff219d1b170584cc2aaeb

See more details on using hashes here.

File details

Details for the file shifthtml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shifthtml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for shifthtml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c42dcf2bab9d0c1a1f625fd4f5f272b69cc1de3628e221293afab588c89d03c
MD5 1668551d22b567fa606237c97b033acc
BLAKE2b-256 97766f392dfaa325120e5d5b4d8b261ffef9ee74b52851d6e838379ddd0af8e1

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