Python Handout
Turn Python scripts into handouts with Markdown comments and inline figures. An alternative to Jupyter notebooks without hidden state that supports any text editor.
| Code | Handout |
|---|---|
Getting started
You use Python Handout as a library inside a normal Python program:
- Install via
pip3 install -U handout. - Run your script via
python3 script.py. (You can start with theexample.pyfrom the repository.) - Open
output/index.htmlin your browser to view the result. - Iterate and refresh your browser.
Features
Create the handout via doc = handout.Handout(outdir) to access these features:
| Feature | Example |
|---|---|
| Add Markdown text as triple-quote comments. | """Markdown text""" |
Add text via print() syntax. |
doc.add_text('text:', variable) |
| Add image from array or url. | doc.add_image(image, 'png', width=1) |
| Add video from array or url. | doc.add_video(video, 'gif', fps=30, width=1) |
| Add matplotlib figure. | doc.add_figure(fig, width=1) |
| Add custom HTML. | doc.add_html(string) |
Insert added items and save to <outdir>/index.html. |
doc.show() |
Questions
Feel free to create an issue on Github.
Metadata
Release files for handout 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| handout-1.1.2.tar.gz | 18.9 kB | Without provenance | Details for handout-1.1.2.tar.gz |
Release files / handout-1.1.2.tar.gz
| Download URL | handout-1.1.2.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52daaf1f9a4cb2ceb88c1dedf85d22ef449b9422b424a2534d21f941e57bc915
|
|
BLAKE2b-256 checksum How to use checksums |
a85e8e9a0e2eacdc10c1835056945be217889a3ebe2cc11e9e5dcce76105d81a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4
|
Security for handout 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.