On the fly conversion of Python docstrings to markdown
Python
31
106 commits
updated Jun 20, 2025
On the fly conversion of Python docstrings to markdown
pip install docstring-to-markdown
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
docstring_to_markdown entry point group allows to add custom converters which follow the Converter protocol.
The built-in converters can be customized by providing entry point with matching name.
pip install -e .
pytest
626 followers · starred May 2024
On the fly conversion of Python docstrings to markdown
Python
31
106 commits
updated Jun 20, 2025
On the fly conversion of Python docstrings to markdown
pip install docstring-to-markdown
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
docstring_to_markdown entry point group allows to add custom converters which follow the Converter protocol.
The built-in converters can be customized by providing entry point with matching name.
pip install -e .
pytest
626 followers · starred May 2024