Declaratively generate simple HTML pages in Python
Project description
DECH
DECH is a library for DEClaratively generating HTML pages in Python. This may be useful for generating summary report pages containing images/tables from scientific scripts.
Install
pip install dech
Example Usage
from dech import *
import matplotlib.pyplot as plt
import numpy as np
img1 = np.random.random((100, 100))
plt.figure('plot1')
plt.plot(np.random.random(10))
plt.figure('plot2')
plt.plot(np.random.random(10))
Page(
[
[
Figure('Example 1', Img('/tmp/example.gif')),
Figure('Example 2', Img('/tmp/example.gif')),
Figure('Example 3', Img('/tmp/example.gif')),
],
[
Figure('Matplotlib 1', Img(plt.figure('plot1'), width=300)),
Figure('Matplotlib 2', Img(plt.figure('plot2'), width=300)),
],
[
Figure('Numpy Array', Img(img1, width=300)),
],
]).save('/tmp/display.html')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dech-0.0.1.tar.gz
(15.8 kB
view details)
Built Distribution
dech-0.0.1-py3-none-any.whl
(15.9 kB
view details)
File details
Details for the file dech-0.0.1.tar.gz
.
File metadata
- Download URL: dech-0.0.1.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 142ad3f4c21b0fcba26022021f93dc54b127c1b32d69c1ae23aef53bcde13e78 |
|
MD5 | 7adc66013e66bff1bf6b49d9b121488b |
|
BLAKE2b-256 | e3f6284aa8637943a56d9ce8cf857dc60a0d90ca50b460fe42881caa6306b124 |
File details
Details for the file dech-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: dech-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804ae7480c39f0136c591d633bf3946fd69ba7cdb9df56009787acbc43742c79 |
|
MD5 | 19c379a1f7207167c953a6b72d1c33ce |
|
BLAKE2b-256 | 7542f7b69d219c2726e12b313ad82ebc22b9a078319dffbc64b1850717c3bc08 |