Skip to main content

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')

Metadata

Release files for dech 0.0.1

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

Source distribution (sdist)

Source distribution for dech 0.0.1
File Size Uploaded
dech-0.0.1.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dech 0.0.1
File Interpreter ABI Platform
dech-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / dech-0.0.1.tar.gz

Download URL dech-0.0.1.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
142ad3f4c21b0fcba26022021f93dc54b127c1b32d69c1ae23aef53bcde13e78
BLAKE2b-256 checksum
How to use checksums
e3f6284aa8637943a56d9ce8cf857dc60a0d90ca50b460fe42881caa6306b124
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / dech-0.0.1-py3-none-any.whl

Download URL dech-0.0.1-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
804ae7480c39f0136c591d633bf3946fd69ba7cdb9df56009787acbc43742c79
BLAKE2b-256 checksum
How to use checksums
7542f7b69d219c2726e12b313ad82ebc22b9a078319dffbc64b1850717c3bc08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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