pdoc demo.py
"""
A small `pdoc` example.
"""
class Dog:
"""🐕"""
name: str
"""The name of our dog."""
friends: list["Dog"]
"""The friends of our dog."""
def __init__(self, name: str):
"""Make a Dog without any friends (yet)."""
self.name = name
self.friends = []
def bark(self, loud: bool = True):
"""*woof*"""
pdoc
auto-generates API documentation that follows your project's Python module hierarchy.
It requires no configuration, has first-class support for type annotations,
cross-links between identifiers, comes with an integrated live-reloading web server,
uses customizable HTML templates, understands numpydoc and Google-style docstrings,
and is permissively licensed.