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

Uploaded Source

Built Distribution

docstring_to_markdown-0.4-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docstring-to-markdown-0.4.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.7

File hashes

Hashes for docstring-to-markdown-0.4.tar.gz
Algorithm Hash digest
SHA256 ddb4bf427f95245589d028beb4172762795626446f3752ca2b56758ca6f09af0
MD5 0fbef6ac03fdac558623d8fae56cdcc7
BLAKE2b-256 6e45161798643657888eb8fcbd2832e99e42087f6eb630057b4e60ecbef30956

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docstring_to_markdown-0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.7

File hashes

Hashes for docstring_to_markdown-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f4a5433060aa905d20bdfdd6b0624344ccad8adce574ec1c942de8e1d2852dd7
MD5 d4f0497b2d1823731243c0a928c77736
BLAKE2b-256 eef69c7f03ceaa7bb66939f569ec881ae8042cbb3528c57202cb1a8a64c45fb5

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