Skip to main content

API Documentation for Python Projects

Project description

pdoc

pdoc documentation CI Status Code Coverage autofix.ci: yes PyPI Version Supported Python Versions

API Documentation for Python Projects.

Example

pdoc -o ./html pdoc generates this website: pdoc.dev/docs.

Installation

pip install pdoc

pdoc is compatible with Python 3.9 and newer.

Usage

pdoc your_python_module
# or
pdoc ./my_project.py

Run pdoc pdoc to see pdoc's own documentation, run pdoc --help to view the command line flags, or check our hosted copy of the documentation.

Features

pdoc's main feature is a focus on simplicity: pdoc aims to do one thing and do it well.

  • Documentation is plain Markdown.
  • First-class support for type annotations and all other modern Python 3 features.
  • Builtin web server with live reloading.
  • Customizable HTML templates.
  • Understands numpydoc and Google-style docstrings.
  • Standalone HTML output without additional dependencies.

Under the hood...

  • pdoc will automatically link identifiers in your docstrings to their corresponding documentation.
  • pdoc respects your __all__ variable when present.
  • pdoc will traverse the abstract syntax tree to extract type annotations and docstrings from constructors as well.
  • pdoc will automatically try to resolve type annotation string literals as forward references.
  • pdoc will use inheritance to resolve type annotations and docstrings for class members.

If you have substantially more complex documentation needs, we recommend using Sphinx!

Contributing

As an open source project, pdoc welcomes contributions of all forms.

Dev Guide

pdoc vs. pdoc3

This project is not associated with "pdoc3", which often falsely assumes our name. Quoting @BurntSushi, the original author of pdoc:

I'm pretty disgusted that someone has taken a project I built, relicensed it, attempted to erase its entry on the Python Wiki, released it under effectively the same name and, worst of all, associated it with Nazi symbols.

Source: https://github.com/pdoc3/pdoc/issues/64

In contrast, the pdoc project strives to uphold a healthy community where everyone is treated with respect. Everyone is welcome to contribute as long as they adhere to basic civility. We expressly distance ourselves from the use of Nazi symbols and ideology.


The pdoc project was originally created by Andrew Gallant and is currently maintained by Maximilian Hils.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdoc-15.0.1.tar.gz (154.2 kB view details)

Uploaded Source

Built Distribution

pdoc-15.0.1-py3-none-any.whl (144.2 kB view details)

Uploaded Python 3

File details

Details for the file pdoc-15.0.1.tar.gz.

File metadata

  • Download URL: pdoc-15.0.1.tar.gz
  • Upload date:
  • Size: 154.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for pdoc-15.0.1.tar.gz
Algorithm Hash digest
SHA256 3b08382c9d312243ee6c2a1813d0ff517a6ab84d596fa2c6c6b5255b17c3d666
MD5 8eeec86879ce114537278de9c0fd5d1c
BLAKE2b-256 bf161b542af6f18a27de059f722c487a596681127897b6d31f78e46d6e5bf2fe

See more details on using hashes here.

File details

Details for the file pdoc-15.0.1-py3-none-any.whl.

File metadata

  • Download URL: pdoc-15.0.1-py3-none-any.whl
  • Upload date:
  • Size: 144.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for pdoc-15.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd437ab8eb55f9b942226af7865a3801e2fb731665199b74fd9a44737dbe20f9
MD5 22da785561e5b4e4e13bbb6e733bd062
BLAKE2b-256 2f4d60d856a1b12fbf6ac1539efccfa138e57c6b88675c9867d84bbb46455cc1

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page