Package: pdocs
Read Latest Documentation-Browse GitHub Code Repositorypdocsis a library and a command line program to discover the public
interface of a Python module or package. Thepdocsscript can be used to
generate Markdown or HTML of a module's public interface, or it can be used
to run an HTTP server that serves generated HTML for installed modules.pdocsis an MIT Licensed fork ofpdoc's original implementation by Andrew Gallant (@BurntSushi).
with the goal of staying true to the original vision layed out by the project's creator.NOTE: For most projects, the best way to usepdocsis usingportray.FeaturesSupport for documenting data representation by traversing the abstract syntax
to find docstrings for module, class and instance variables.For cases where docstrings aren't appropriate (like anamedtuple),
the special variable__pdocs__can be used in your module to
document any identifier in your public interface.Usage is simple. Just write your documentation as Markdown. There are no
added special syntax rules.pdocsrespects your__all__variable when present.pdocswill automatically link identifiers in your docstrings to its
corresponding documentation.Whenpdocsis run as an HTTP server, external linking is supported between
packages.ThepdocsHTTP server will cache generated documentation and automatically
regenerate it if the source code has been updated.When available, source code for modules, functions and classes can be viewed
in the HTML documentation.Inheritance is used when possible to infer docstrings for class members.The above features are explained in more detail in pdocs's documentation.pdocsis compatible with Python 3.6 and newer.Quick StartThe following guides should get you up using pdocs in no time:Installation- TL;DR: Runpip3 install pdocswithin your projects virtual environment.Command Line Usage- TL;DR: Runpdocs server YOUR_MODULESto test andpdocs as_html YOUR_MODULESto generate HTML.API Usage- TL;DR: Everything available via the CLI is also easily available programmatically from within Python.Differences Between pdocs and pdocBelow is a running list of intentional differences betweenpdocandpdocs:pdocs has built-in support for Markdown documentation generation (as needed byportray).pdocs has built-in support for the inclusion of Type Annotation information in reference documentation.pdocs requires Python 3.6+; pdoc maintains Python2 compatibility as of the latest public release.pdocs uses the most recent development tools to ensure long-term maintainability (mypy, black, isort, flake8, bandit, ...)pdocs generates project documentation to a temporary folder when serving locally, instead of including a live server. An intentional trade-off between simplicity and performance.pdocs provides a simplified Python API in addition to CLI API.pdocs is actively maintained.pdocs useshug CLI and sub-commands, pdoc usesargparse and a single command.pdoc provides textual documentation from the command-line, pdocs removed this feature for API simplicity.Notes on Licensing and ForkThe original pdoc followed theUnlicense license, and as such so does the initial commit to this forkhere.
Unlicense is fully compatible with MIT, and the reason for the switch going forward is because MIT is a more standard and well-known license.As seen by that commit, I chose to fork with fresh history, as the project is very old (2013) and I felt many of the commits that happened in the past might, instead of helping to debug issues, lead to red herrings due to the many changes that have happened
in the Python eco-system since that time. If you desire to see the complete history for any reason, it remains available on the originalpdoc repository.Why Createpdocs?I createdpdocsto help powerportraywhile staying true to the original vision ofpdocand maintain
MIT license compatibility. In the end I created it to help power better documentation websites for Python projects.I hope you, too, findpdocsuseful!~Timothy Crosley