Skip to main content

A lightweight package for html generation

Project description

hiccough

Hiccough is a simple html templating tool heavily inspired by https://github.com/weavejester/hiccup. It allows for the generation of html strings from nested lists of python like so

hiccough.html(["div.myclass", ["p", "Hello World!"]])
=> '<div class="myclass"><p>Hello World!</p></div>'

Nesting Shorthand

Hiccough supports a nesting syntax via > for multiple nested tags with only classes and ids.

html(["div.a>div.b>div.c", "It's divs all the way down!"])
=>'<div class="a"><div class="b"><div class="c"></div>It's divs all the way down!</div></div>'

CLI

Hiccough currently support execution on the cli with the first argument being a string that evals to a python list matching what would get passed to html/1

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

hiccough-0.0.8.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

hiccough-0.0.8-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file hiccough-0.0.8.tar.gz.

File metadata

  • Download URL: hiccough-0.0.8.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for hiccough-0.0.8.tar.gz
Algorithm Hash digest
SHA256 c5f2895328a511ab5fff4c0d052b8f50460adc6d7c22ebf90619a7f9a30774f3
MD5 32dd08291052471ab85c87866d9cda5a
BLAKE2b-256 b389bf05f299cb5a06497d5432892b14a50ae3838b85b0053637a3cb126d8cae

See more details on using hashes here.

File details

Details for the file hiccough-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: hiccough-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for hiccough-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f29db731fb31d3c685e5cb231363f4d263809ae7eb364b7821a8f8cede8655dd
MD5 10a2dc2ef2fea5f0620c3734e3af8294
BLAKE2b-256 773bfada4264b6aa150ee687e1327bd219b0e8d0beb6a5f66079750ae4a736a9

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