Skip to main content

A tiny eDSL to generate HTML/SVG/XML-looking strings.

Project description

eXML

A tiny eDSL to generate HTML/SVG/XML-looking strings.

Example

See tests for more code and output.

import exml

html = exml.Tag("html")
with html.body().table(width="100%") as t:
    with t.tr(class_="fancy") as row:
        row.td("a")
        row.td("b")
    with t.tr(style={"color": "red"}) as row:
        row.attrs["style"]["width"] = 123
        row.td("x")
        row.td("y")
print(str(html))

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

exml-0.3.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

exml-0.3.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file exml-0.3.0.1.tar.gz.

File metadata

  • Download URL: exml-0.3.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.15

File hashes

Hashes for exml-0.3.0.1.tar.gz
Algorithm Hash digest
SHA256 4d777cbd4f28bde7f8d2113d3da864dff0a05e8108daffa3c997680ee755efe7
MD5 39f6a721d46a34d6580e05c668e743d6
BLAKE2b-256 036079e87aad78f0192f96d164eba979393304b5ecba41fc824b8bd166026f44

See more details on using hashes here.

File details

Details for the file exml-0.3.0.1-py3-none-any.whl.

File metadata

  • Download URL: exml-0.3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.15

File hashes

Hashes for exml-0.3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84f9d8401c75738f3558108804d022bde966461e292685b47cf54790c86df89b
MD5 6577af660b0e3679e9de2b3176b2de50
BLAKE2b-256 1f5cede91f2fad37e10c04a387a4913038473aec495054c641a2d9ae75fd1494

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