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.13.tar.gz
(26.6 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3025c428638ececae920d6d26054546a20335af3504a145327e657e7ad7ce1ce |
|
MD5 | da71ebf2b40d56f7fe56100a4816db96 |
|
BLAKE2b-256 | 2b114be3230b6ebaeb31b2406876367243780d10a28da3a881a45a960ed4469b |
Close
Hashes for docstring_to_markdown-0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa487059d0883e70e54da25c7b230e918d9e4d40f23d6dfaa2b73e4225b2d7dd |
|
MD5 | 0500f4d492195f7e94639245cb919de6 |
|
BLAKE2b-256 | be4f1b6eb5a6d92ae52f3798e9fdffd225f1bcd017172bb732743315390a9025 |