Skip to main content

On the fly conversion of Python docstrings to markdown

Project description

docstring-to-markdown

tests CodeQL pypi-version

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


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.8.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

docstring_to_markdown-0.8-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file docstring-to-markdown-0.8.tar.gz.

File metadata

  • Download URL: docstring-to-markdown-0.8.tar.gz
  • Upload date:
  • Size: 17.0 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

Hashes for docstring-to-markdown-0.8.tar.gz
Algorithm Hash digest
SHA256 4fd1023c0cba3c83914d7ef23ad09b90cc3e609067760a219cf7dd8a17b34137
MD5 b13ccd5bc201560087c24f8318ddb4ac
BLAKE2b-256 e7050c1360e4152c194513883a95a28a076e3330f8694cbe98efbf5c9cc59117

See more details on using hashes here.

File details

Details for the file docstring_to_markdown-0.8-py3-none-any.whl.

File metadata

  • Download URL: docstring_to_markdown-0.8-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

Hashes for docstring_to_markdown-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 040657af3ce301ca455dc9ddb7a9eaf1c55d067d94bdeaade56ee384712e0a27
MD5 5c77d2b6a0a9526a300e50667783f400
BLAKE2b-256 b4db76c291ebc58fac6a2dcb6a6036d4afdd19c11b2616eefd320615274e90ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page