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, send-embedder-url, title="...",
run-label="...", stop-label="...", theme="...",
terminal-rows="...", terminal-cols="...", class and id
pass through to the element - each documented at
importpython.org.
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.1
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.1.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| importpython_markdown-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / importpython_markdown-0.1.1.tar.gz
| Download URL | importpython_markdown-0.1.1.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9183c14efc9a9f714d0cd2f82f2722a78fc222d4ccc51be917b460cbf537f39c
|
|
BLAKE2b-256 checksum How to use checksums |
c5edbd6d2074a351872cccf796b0e31ed10f5cb55b42bc1493062f128f0070b3
|
| 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.1-py3-none-any.whl
| Download URL | importpython_markdown-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db377f7382f85e057a6947a0a7a1f99f682d76300e92904f7e2246b2e7520e0e
|
|
BLAKE2b-256 checksum How to use checksums |
ae9eb4b1b69a0f015280d6d899151c4bb9130db669226d37b32b8a9a6c7ffc6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|