pip install pdoc
python
def add(a, b):
"""
This function takes two numbers as input and returns their sum.
Parameters:
a (int): The first number.
b (int): The second number.
Returns:
int: The sum of the two numbers.
"""
return a + b
def subtract(a, b):
"""
This function takes two numbers as input and returns their difference.
Parameters:
a (int): The first number.
b (int): The second number.
Returns:
int: The difference of the two numbers.
"""
return a - b
pdoc example.py
output_dir = docs
modules = example
title = My Python Documentation
include_private = True
theme = dark
pdoc --config pdoc.conf