docstring-to-markdown 0.16
pip install docstring-to-markdown
Latest version
Released:
On the fly conversion of Python docstrings to markdown
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU Lesser General Public License v2 or later (LGPLv2+) (LGPL-2.1-or-later)
- Author: Michał Krassowski
- Tags Docstring, conversion, markdown
- Requires: Python >=3.7
Classifiers
- Intended Audience
- License
- Programming Language
- Topic
Project description
docstring-to-markdown
On the fly conversion of Python docstrings to markdown
- Python 3.7+ (tested on 3.8 up to 3.13)
- 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
Extensibility
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.
Development
pip install -e .
pytest
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU Lesser General Public License v2 or later (LGPLv2+) (LGPL-2.1-or-later)
- Author: Michał Krassowski
- Tags Docstring, conversion, markdown
- Requires: Python >=3.7
Classifiers
- Intended Audience
- License
- Programming Language
- Topic
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
Built Distribution
File details
Details for the file docstring_to_markdown-0.16.tar.gz
.
File metadata
- Download URL: docstring_to_markdown-0.16.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 097bf502fdf040b0d019688a7cc1abb89b98196801448721740e8aa3e5075627 |
|
MD5 | 9d120935a4a478ff249311dd73f840f9 |
|
BLAKE2b-256 | 581f16e6d4026e94224d662dcd344dcd3563bc8a74a272f2c27b325793cad5fc |
File details
Details for the file docstring_to_markdown-0.16-py3-none-any.whl
.
File metadata
- Download URL: docstring_to_markdown-0.16-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f92cc42357b2c932f70ca2ebc79f7805039a34011ad381c1b6ac3481e81596ce |
|
MD5 | cc8ea6093179058ddd3f42664de25148 |
|
BLAKE2b-256 | 47a6bf7cda3cc85ad1f8cfbf1ede45ade2c5c25f0a315f8a11e4a7943de66af7 |