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.12.tar.gz
(24.8 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40004224b412bd6f64c0f3b85bb357a41341afd66c4b4896709efa56827fb2bb |
|
MD5 | ebc59714af575eb5ad6197df7fb183f9 |
|
BLAKE2b-256 | 52c26f73c08b97bacd1242835bdca1cfc123b059eb15af9350eb1eb5d58868fc |
Close
Hashes for docstring_to_markdown-0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df6311a887dccf9e770f51242ec002b19f0591994c4783be49d24cdc1df3737 |
|
MD5 | 67f1d2df8e3de4a0b85b7bd34c569178 |
|
BLAKE2b-256 | c9b66a773dbed890800e32485b0e7d10a5653bc12ad6dabe94bd16cc428314ae |