Name | dech JSON |
Version |
0.0.1
JSON |
| download |
home_page | https://github.com/evidlo/dech |
Summary | Declaratively generate simple HTML pages in Python |
upload_time | 2023-04-24 05:42:54 |
maintainer | |
docs_url | None |
author | Evan Widloski |
requires_python | |
license | GPL3 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
``` python
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')
```
![](example.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/evidlo/dech",
"name": "dech",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Evan Widloski",
"author_email": "evan_github@widloski.com",
"download_url": "https://files.pythonhosted.org/packages/e3/f6/284aa8637943a56d9ce8cf857dc60a0d90ca50b460fe42881caa6306b124/dech-0.0.1.tar.gz",
"platform": null,
"description": "# DECH\n\nDECH 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.\n\n## Install\n\n pip install dech\n \n## Example Usage\n\n``` python\nfrom dech import *\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimg1 = np.random.random((100, 100))\n\nplt.figure('plot1')\nplt.plot(np.random.random(10))\nplt.figure('plot2')\nplt.plot(np.random.random(10))\n\nPage(\n [\n [\n Figure('Example 1', Img('/tmp/example.gif')),\n Figure('Example 2', Img('/tmp/example.gif')),\n Figure('Example 3', Img('/tmp/example.gif')),\n ],\n [\n Figure('Matplotlib 1', Img(plt.figure('plot1'), width=300)),\n Figure('Matplotlib 2', Img(plt.figure('plot2'), width=300)),\n ],\n [\n Figure('Numpy Array', Img(img1, width=300)),\n ],\n]).save('/tmp/display.html')\n```\n\n![](example.png)\n\n",
"bugtrack_url": null,
"license": "GPL3",
"summary": "Declaratively generate simple HTML pages in Python",
"version": "0.0.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7542f7b69d219c2726e12b313ad82ebc22b9a078319dffbc64b1850717c3bc08",
"md5": "19c379a1f7207167c953a6b72d1c33ce",
"sha256": "804ae7480c39f0136c591d633bf3946fd69ba7cdb9df56009787acbc43742c79"
},
"downloads": -1,
"filename": "dech-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "19c379a1f7207167c953a6b72d1c33ce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15948,
"upload_time": "2023-04-24T05:42:50",
"upload_time_iso_8601": "2023-04-24T05:42:50.935341Z",
"url": "https://files.pythonhosted.org/packages/75/42/f7b69d219c2726e12b313ad82ebc22b9a078319dffbc64b1850717c3bc08/dech-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e3f6284aa8637943a56d9ce8cf857dc60a0d90ca50b460fe42881caa6306b124",
"md5": "7adc66013e66bff1bf6b49d9b121488b",
"sha256": "142ad3f4c21b0fcba26022021f93dc54b127c1b32d69c1ae23aef53bcde13e78"
},
"downloads": -1,
"filename": "dech-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "7adc66013e66bff1bf6b49d9b121488b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15770,
"upload_time": "2023-04-24T05:42:54",
"upload_time_iso_8601": "2023-04-24T05:42:54.022916Z",
"url": "https://files.pythonhosted.org/packages/e3/f6/284aa8637943a56d9ce8cf857dc60a0d90ca50b460fe42881caa6306b124/dech-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-24 05:42:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "evidlo",
"github_project": "dech",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dech"
}