Skip to main content

HTML Templating DSL for Python

Project description

HTML Templating DSL for Python.
==============================

A simple HTML templating library that uses a DSL
mini-language. I tried to design it to be similar in feel
to Teacup/CoffeeKup (https://github.com/goodeggs/teacup). I
also took inspiration from jamescasbon's template.py script
(https://gist.github.com/jamescasbon/1461441).

Also includes the md() function for embedding markdown, and an option
for outputting prettified HTML.

Example usage::

with html:
with head:
pass
with body:
with p:
md("This is a **test!**")
with p:
text("Another test")
a("Click here", href="https://google.com")

print(render())

The python "with" keyword is used to nest HTML tags.

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

teacup-0.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file teacup-0.1.tar.gz.

File metadata

  • Download URL: teacup-0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for teacup-0.1.tar.gz
Algorithm Hash digest
SHA256 2c72e4416fb18ea95d1cb4fac10da5a0913a3b724ac6f26ebd97f7c7fce5e2ef
MD5 bbd8e1b1f115353687105cb9c7fb3b3b
BLAKE2b-256 fff2442f8e33f1c6f17e589ae0b11578b83f29eae1bceb1d2ca81d117db13ce4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page