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

Uploaded Source

Built Distribution

docstring_to_markdown-0.10-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docstring-to-markdown-0.10.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for docstring-to-markdown-0.10.tar.gz
Algorithm Hash digest
SHA256 12f75b0c7b7572defea2d9e24b57ef7ac38c3e26e91c0e5547cfc02b1c168bf6
MD5 5a77ce06720fa1bb26668e2a38abc4f8
BLAKE2b-256 1ec553e13bb0e3dd8b7fa3595c80deb40a3742dd191a9350141d4daa7ab09a9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docstring_to_markdown-0.10-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for docstring_to_markdown-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a2cd520599d1499d4a5d4eb16dea5bdebe32e5627504fb417d5733570f3d4d0b
MD5 ec0dce17f69c356155845b275773578e
BLAKE2b-256 a9ad71cb84c8be4aa428d27b2c8e380a265b61671b2a15ce0dc4103133d12f6b

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