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 details)
Built Distribution
File details
Details for the file docstring-to-markdown-0.9.tar.gz
.
File metadata
- Download URL: docstring-to-markdown-0.9.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 |
|
MD5 | 5d4c01dff1a9bdd99f4dacafe11be382 |
|
BLAKE2b-256 | 2288d9f55e56f498d795fe3bf73a4b5a7ff374e0c3c1aeed9e5066cc34813d64 |
File details
Details for the file docstring_to_markdown-0.9-py3-none-any.whl
.
File metadata
- Download URL: docstring_to_markdown-0.9-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59 |
|
MD5 | be88f3c9cf0b964a7aa73a79ad8502a6 |
|
BLAKE2b-256 | 07331463d00e3836e71251be7ae647b537628378453f174222b81485b4826dc3 |