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.11.tar.gz
(18.4 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b1da2c89d9d0d09b955dec0ee111284ceadd302a938a03ed93f66e09134f9b5 |
|
MD5 | 6e296e9e30d781420a83d9bed629563d |
|
BLAKE2b-256 | e968cac92c4f3f837fbeba17e8dfcdb7658fac6a1d56c007ed0d407087f1127e |
Close
Hashes for docstring_to_markdown-0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01900aee1bc7fde5aacaf319e517a5e1d4f0bf04e401373c08d28fcf79bfb73b |
|
MD5 | aba091b8f678d06e920ea2bf2690a3f9 |
|
BLAKE2b-256 | ea6988a13ac387ebd1fcfda95eccfe4fa2dfb7e9794c7fa6a76c497c0bfe135c |