importpython-markdown
Runnable Python examples in Markdown pages, for MkDocs, Zensical and anything else built on Python-Markdown, powered by importpython.org.
Wrap a section of ordinary Markdown in #! and !# gates:
#!mpy terminal title="A first example"
A caption, rendered as normal Markdown.
```python
print("Hello, world!")
```
!#
The section becomes a runnable example: the code, a Run button,
and the program's output beneath - nothing downloaded until a
reader presses Run. Plain fences are the program; a fence with
title="name.py" is a file delivered beside it; config and
body fences carry BFP settings and page markup (escaped for
you). The py and mpy types choose Pyodide or MicroPython,
and terminal, debug, title="...", run-label="...",
stop-label="...", theme="...", class and id pass through
to the element.
Install and enable:
pip install importpython-markdown
# mkdocs.yml
markdown_extensions:
- importpython
# zensical.toml
[project.markdown_extensions]
importpython = {}
Pre-release honesty: until BFP's first release, the default
script_url points at the service's test channel, which may
change; pin your own copy with the script_url option if that
matters to you today.
The full documentation lives at importpython.org/docs.
Metadata
Release files for importpython-markdown 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| importpython_markdown-0.1.0.tar.gz | 10.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| importpython_markdown-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / importpython_markdown-0.1.0.tar.gz
| Download URL | importpython_markdown-0.1.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b57259cd1ec5f019dc3cc10705a91525901bb2acb0ad0882d39f73ab6f80cd8
|
|
BLAKE2b-256 checksum How to use checksums |
b4f22225924d65c05949f550efbb32ff54be998b1948fbeb173c34bb10c2dbc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / importpython_markdown-0.1.0-py3-none-any.whl
| Download URL | importpython_markdown-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc9438cff547ed0b2bac45fbd79ed6dd8c4db894309450b0c157e16b028bf6c0
|
|
BLAKE2b-256 checksum How to use checksums |
e13b140e278b34177396cf45006fc4db49dc6569c8ef929cfbe14043c4c2230a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|