Skip to main content

htmlwrite is a python library for writing html to a file like object, using a pythonic syntax. Use as an alternative to templating engines.

>>> import sys
>>>
>>> from htmlwrite import Writer, Tag
>>>
>>> writer = Writer(sys.stdout)
>>> w = writer.write
>>> c = writer.context
>>>
>>> with c(Tag('html')):
...     with c(Tag('body')):
...         with c(Tag('div', class_=('foo', ), s_font_weight='bold')):
...             w('Hello world  ')
...         w(Tag('div'), 'ok, bye.')
...
<html>
  <body>
    <div class="foo" style="font-weight: bold;">
      Hello world
    </div>
    <div>ok, bye.</div>
  </body>
</html>

Metadata

Release files for htmlwrite 0.7.0

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

Source distribution (sdist)

Source distribution for htmlwrite 0.7.0
File Size Uploaded Provenance Actions
htmlwrite-0.7.0.tar.gz 6.6 kB Without provenance Details for htmlwrite-0.7.0.tar.gz

Release files / htmlwrite-0.7.0.tar.gz

Download URL htmlwrite-0.7.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1241542aac4a515daf88aba86d46482edd0a8b1e736e20fc90afd88a722797e2
BLAKE2b-256 checksum
How to use checksums
9335142543f5cf7d705e6c725fd9d2f91ab5c3702e4df65d0a3a2795bc4d2c30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Security for htmlwrite 0.7.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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