Skip to main content

Markdown Refdocs

build PyPi codecov PyPI - Downloads

Extracts docstings and type annotations from a python package to generate reference documentation in markdown. See an example of this at: https://creisle.github.io/markdown_refdocs/

Getting Started

Install the package from pip

pip install markdown_refdocs

Run this from the command line or import the function to get the markdown returns as strings and customize. This tool has the customary help manu you can view with the -h option to see the options documentation

markdown_refdocs -h

Generate markdown reference documentation from your python package like so

markdown_refdocs /path/to/python/package -o /path/to/output/dir

This will generate markdown files under /path/to/output/dir which can be used standalone or incorporated in a Mkdocs build

Examples

Documentation for this package itself can be generated using this tool itself

markdown_refdocs markdown_refdocs -o docs/reference

This will build the following files (1 file per python sub-module)

docs/reference/
└── markdown_refdocs
    ├── links.md
    ├── main.md
    ├── markdown.md
    ├── parsers.md
    └── types.md

See a live demo of this under: https://creisle.github.io/markdown_refdocs

Features

  • parses google-style docstrings
  • generates markdown output (this allows the user to link into the navigation or their main docs)
  • can take package directories as input
  • reads type annotations
  • pulls function signatures

Limitations

Motivation

The motivation for this package was that writing docs in markdown is simpler to read and write than writing them in RST. There is an awesome package called Mkdocs for turning your markdown documents into a static site. It has a number of plugins which extract docstrings from python files, however none of them are able to use the google docstring format which I prefer. If you're using a different docstring format you can check them out here on the Mkdocs plugin wiki.

Metadata

Release files for markdown-refdocs 1.4.1

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

Source distribution (sdist)

Source distribution for markdown-refdocs 1.4.1
File Size Uploaded
markdown_refdocs-1.4.1.tar.gz 16.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for markdown-refdocs 1.4.1
File Interpreter ABI Platform
markdown_refdocs-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.0 kB

Release files / markdown_refdocs-1.4.1.tar.gz

Download URL markdown_refdocs-1.4.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c4ac67e4d9b9436d30e9d1bd9ca9995d05802b403460da49b8732f5e88f2377e
BLAKE2b-256 checksum
How to use checksums
faab3b32b77a69d26ae4b406ad9f6e4f20fe1e96ea1af67345a85ac0dde8de98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / markdown_refdocs-1.4.1-py3-none-any.whl

Download URL markdown_refdocs-1.4.1-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b653935e256a8f2d1637c63fac4fd509bb40dfb5f2368ea18d2eee6fbb045fcd
BLAKE2b-256 checksum
How to use checksums
b60eff148050b62736c8d5cfb2eb4cbaabf4bcffaac03908ae1aefaae1ea94f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

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