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+
- can recognise reStructuredText and convert multiple of its features to Markdown
- since v0.13 includes initial support for Google-formatted docstrings
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.14.tar.gz
(29.0 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9b061b42ee848149e122a647013b4f0778141596230f3203fe7f5404b3e9ab2 |
|
MD5 | 6858dbcc527e1c841094dcad21f590c1 |
|
BLAKE2b-256 | e18412e7183fbb8772e5a00ebfd48552ccbd4820621b1c2e624cc1a149297597 |
Close
Hashes for docstring_to_markdown-0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a45627eec9d816a734790100ef2913e4ecc827315b18f32badc8c186bae293 |
|
MD5 | 3b7b6dd782d5f1a4385babf49b71382d |
|
BLAKE2b-256 | 702c3324af107e43e70b3da6c510ecdfeaf44bf1949926531f24accab13650f8 |