On the fly conversion of Python docstrings to markdown
Project description
docstring-to-markdown
On the fly conversion of Python docstrings to markdown
- Python 3.6+
- currently can recognise reStructuredText and convert multiple of its features to Markdown
- in the future will be able to convert Google docstrings too
Installation
pip install docstring-to-markdown
Example
Convert reStructuredText:
>>> import docstring_to_markdown
>>> docstring_to_markdown.convert(':math:`\\sum`')
'$\\sum$'
When given the format cannot be recognised an exception will be raised:
>>> docstring_to_markdown.convert('\\sum')
Traceback (most recent call last):
raise UnknownFormatError()
docstring_to_markdown.UnknownFormatError
Development
pip install -e .
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docstring-to-markdown-0.6.tar.gz
(16.7 kB
view details)
Built Distribution
File details
Details for the file docstring-to-markdown-0.6.tar.gz
.
File metadata
- Download URL: docstring-to-markdown-0.6.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23410e7d35dbf9c3586400f012d393fb6827bb59cc87e2df15a20f885ea8ca2f |
|
MD5 | 936c9be27a8e16a734e52e4eb17f28d3 |
|
BLAKE2b-256 | 7ef05f752e14072998923c70de86b5ad46af57c2208850f7d715efd2a4f05d9a |
File details
Details for the file docstring_to_markdown-0.6-py3-none-any.whl
.
File metadata
- Download URL: docstring_to_markdown-0.6-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a121db28bbc3d24b158850be0c9a399106004f43f1e62136f074b78ef50f80d3 |
|
MD5 | 107562718477305e14fb469bea54c832 |
|
BLAKE2b-256 | a268b9417fc4d0389e9ea83c089ca25c9ccb9f20bb12a377eeb9ebdbf5dbf277 |