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.9.tar.gz
(17.1 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 |
|
MD5 | 5d4c01dff1a9bdd99f4dacafe11be382 |
|
BLAKE2b-256 | 2288d9f55e56f498d795fe3bf73a4b5a7ff374e0c3c1aeed9e5066cc34813d64 |
Close
Hashes for docstring_to_markdown-0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59 |
|
MD5 | be88f3c9cf0b964a7aa73a79ad8502a6 |
|
BLAKE2b-256 | 07331463d00e3836e71251be7ae647b537628378453f174222b81485b4826dc3 |