A simple program and library to auto generate API documentation for Python modules.
Project description
Read Latest Documentation - Browse GitHub Code Repository
pdocs
is a library and a command line program to discover the public
interface of a Python module or package. The pdocs
script 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.
pdocs
is an MIT Licensed fork of pdoc
with the goal of staying true to the original vision
layed out by the projects creator.
NOTE: For most projects, the best way to use pdocs
is using portray.
Features
- Support 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 a
namedtuple),
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.
pdocs
respects your__all__
variable when present.pdocs
will automatically link identifiers in your docstrings to its corresponding documentation.- When
pdocs
is run as an HTTP server, external linking is supported between packages. - The
pdocs
HTTP 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.
pdocs
is compatible with Python 3.6 and newer.
Quick Start
The following guides should get you up using pdocs in no time:
- Installation - TL;DR: Run
pip3 install pdocs
within your projects virtual environment. - Command Line Usage - TL;DR: Run
pdocs server YOUR_MODULES
to test andpdocs as_html YOUR_MODULES
to generate HTML. - API Usage - TL;DR: Everything available via the CLI is also easily available programmatically from within Python.
Why Create pdocs
?
I created pdocs
to help power portray while staying true to the original vision of pdoc
and maintain
MIT license compatibility. In the end I created it to help power better documentation websites for Python projects.
I hope you too find pdocs
useful!
~Timothy Crosley
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
Built Distribution
File details
Details for the file pdocs-1.0.1.tar.gz
.
File metadata
- Download URL: pdocs-1.0.1.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.3 Linux/5.0.0-25-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a0346f56c08ab5701ca9b14630aa1f0f32f1c29ee7efcfc8bc512cd272f89b |
|
MD5 | 7843acddadc185844a03600be50c55c9 |
|
BLAKE2b-256 | b7149070549dd862faf3f24ea82ecb709071ca765395abcdf45476c8c50f617a |
File details
Details for the file pdocs-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pdocs-1.0.1-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.3 Linux/5.0.0-25-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c0d24fdc0e0c537be8f2418edb4f1075da46a0d749b17ea20b74e7e60124f49 |
|
MD5 | 642fee545b0047f8c109cd4759c1a4c8 |
|
BLAKE2b-256 | bf4740854264a493bfba1c16b55c99f89c5a4a833b52e64283b7f053369eeb6c |