Skip to main content

No project description provided

Project description

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.

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

markdown_refdocs-1.4.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

markdown_refdocs-1.4.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file markdown_refdocs-1.4.0.tar.gz.

File metadata

  • Download URL: markdown_refdocs-1.4.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for markdown_refdocs-1.4.0.tar.gz
Algorithm Hash digest
SHA256 594c573fbceadc2eb4f8366487984e76e85322bd87cee8beaf7270b6b6df6e6b
MD5 cd327ee955ed25bedbf0ae5e2252a357
BLAKE2b-256 b421849ab81772158d8a99b3dee7a07467ace25a701cbe4f4d13f6a28138f566

See more details on using hashes here.

Provenance

File details

Details for the file markdown_refdocs-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: markdown_refdocs-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for markdown_refdocs-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d45796c1078dae80d861f68137e104a96c046041ae0e5b911b6fda7e440c195
MD5 1fe06c27919e87f2f487ac381a81c479
BLAKE2b-256 2b0b4ed80c2d5b0fb042d03f71bf01e5656ecfde624c0020617498e2e135c749

See more details on using hashes here.

Provenance

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