Skip to main content

small package to easily write html code within a python script

Project description

pyhtml

pyhtml is a little toolbox which allows you to write html content within your python script into a variable. This variable then can be saved to a .html file and be opened with any standard browser.

Where to get it

# PyPI
pip install pyhtmlgen

supported html objects

  • h1, h2, h3
  • paragraphs
  • line breaks
  • tables
  • links
  • pictures

supported python objects

  • strings
  • numpy matrices
  • pandas dataframes
  • plotly figures

How to use

  • wothin your python code create a variable to store a string
  • use generators.start('Title of your page') to add the html head
  • add content as needed using the other functions
  • use generators.end() to close the html file correctly
  • write the variable to a file

Have a look at the example.py script for more information on GitHub https://github.com/danvran/pyhtmlgen

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

pyhtmlgen-0.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

pyhtmlgen-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file pyhtmlgen-0.0.2.tar.gz.

File metadata

  • Download URL: pyhtmlgen-0.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for pyhtmlgen-0.0.2.tar.gz
Algorithm Hash digest
SHA256 aa253cda66dc234c3955f6bfa334e1cfd9e77313672c6536e9b8a8b2b701f10d
MD5 33a1fc4ebd382cee4e5d39144ebd3a85
BLAKE2b-256 849bdb2eb56dab0d3db8a65203b7508f38fff4f442de27a74aa093d08b8dc534

See more details on using hashes here.

File details

Details for the file pyhtmlgen-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyhtmlgen-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for pyhtmlgen-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96d69afe79a5fccb4b7f3d06f098de29153a43035a122d86d27d730c861ee6f7
MD5 cb74ff07cfd3cf175fd6f582b3fc9721
BLAKE2b-256 a942442a5737faca7d8cdad5d9f8dc13392cd4bd632dea45ec2bbe0ed75746bf

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