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+ (tested on 3.7 up to 3.11)
- 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.15.tar.gz
(29.2 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e146114d9c50c181b1d25505054a8d0f7a476837f0da2c19f07e06eaed52b73d |
|
MD5 | fe2d4afd2e75807fc8b72957aaef8a29 |
|
BLAKE2b-256 | 7aad6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53 |
Close
Hashes for docstring_to_markdown-0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27afb3faedba81e34c33521c32bbd258d7fbb79eedf7d29bc4e81080e854aec0 |
|
MD5 | 0e4c4f2f60fba46c0b1b136e9262d89e |
|
BLAKE2b-256 | c1cf4eee59f6c4111b3e80cc32cf6bac483a90646f5c8693e84496c9855e8e38 |