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.5.tar.gz
(15.6 kB
view hashes)
Built Distribution
Close
Hashes for docstring-to-markdown-0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9c24bec9fdada4191851b181bfff4649f35ee554478e0ce7ace65ae0d233a70 |
|
MD5 | fa3a15976f1168ca40c6889796d53930 |
|
BLAKE2b-256 | da919c88a7ec56ade725f65d1eb6eac53ff4d8c7361bc26cbd84bf49b2ec31fc |
Close
Hashes for docstring_to_markdown-0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ada0cbdce90acc308ec83c6e64545f99f8ce1f29033357304090bd91297d480f |
|
MD5 | df25b1b998de04e7066f2dbafde8546a |
|
BLAKE2b-256 | 56672d8b7f615d7704eceb60daafced3a4ea421ef0cb6bdfd905c67b05f787f5 |