Skip to main content

docstring-to-markdown

tests CodeQL pypi-version

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

Release files for docstring-to-markdown 0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docstring-to-markdown 0.17
File Size Uploaded
docstring_to_markdown-0.17.tar.gz 32.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docstring-to-markdown 0.17
File Interpreter ABI Platform
docstring_to_markdown-0.17-py3-none-any.whl Python 3 none any Details

Total release size: 55.7 kB

Release files / docstring_to_markdown-0.17.tar.gz

Download URL docstring_to_markdown-0.17.tar.gz
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
df72a112294c7492487c9da2451cae0faeee06e86008245c188c5761c9590ca3
BLAKE2b-256 checksum
How to use checksums
52d88abe80d62c5dce1075578031bcfde07e735bcf0afe2886dd48b470162ab4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2025.

Transparency log

Release files / docstring_to_markdown-0.17-py3-none-any.whl

Download URL docstring_to_markdown-0.17-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd7d5094aa83943bf5f9e1a13701866b7c452eac19765380dead666e36d3711c
BLAKE2b-256 checksum
How to use checksums
567baf3d0da15bed3a8665419bb3a630585756920f4ad67abfdfef26240ebcc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.17 This release

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.13

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page