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.7.tar.gz
(16.8 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 374bad3595b970bc558e1422225f313229988424d5b242d85cbda7da30370375 |
|
MD5 | bfcbeb68834314a5a73b14714adb8de9 |
|
BLAKE2b-256 | 576037183e8944a001efd1144c502fcccd4f1e5dfc5be756e4179999e4c04582 |
Close
Hashes for docstring_to_markdown-0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1811fb2ad38bf8ac24e8bac6c74503cdb120a6a3b2c62bf9a0ab44a59656901 |
|
MD5 | 94a6869cd89d7753459ff8b544071086 |
|
BLAKE2b-256 | 517d1bd104c2b7eae0ac72eb371fb35845ab56e8cadba36441af5b02ad67d7bf |