Skip to main content

doc-zero

Doc-zero streamlines the process of writing documentation for your project. It is an opinionated and explicitly non-configurable tool that extracts information from your Python codebase and generates nice documentation with minimal effort.

The main influence is the elm language tooling: no config, nice defaults and it creates a very decent documentation out of the box. Rust has a similar experience with RustDoc. In comparison, both Sphinx and MkDocs are very powerful but somewhat clunky to use and configure.

How does it work?

doc-zero introspect your codebase and creates a Sphinx project under the hood. In practice, if you have a relatively modern Python project (i.e., it assumes the existence of pyproject.toml) just type

$ doc-zero build # or the doc0 alias

in the project root and it will create and build the documentation under <project-root>/docs. In doc-zero, all your documentation resides either in the README.md file in your repository or inside the source code.

You can also type

$ doc-zero serve

and

doc-zero test

to run either the live server or to test the doctests inside the documentation.

Adding the documentation to your project

Doc-zero assumes your project is already documented using docstrings and that you have a README.md file in the project root. It will use those assets to generate the documentation and the necessary configurations to make it buildable with Sphinx and ready to be hosted to readthedocs.io.

The first step is to install doc-zero as a development dependency in your project. You can do this by running

$ pip install doc-zero

or the equivalent command for the package manager of choice.

Then, the following command generates the documentation:

$ doc-zero build

doc-zero always creates a module documentation for your toplevel module. It will also scan all sub-modules and generate a documentation page if they satisfy the following conditions:

  • The module is not private (i.e., it does not start with an underscore).
  • The module has a docstring.
  • The module defines a __all__ variable that lists its public API.

doc-zero only includes the public API in the generated documentation.

Metadata

Release files for doc-zero 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doc-zero 0.2.1
File Size Uploaded
doc_zero-0.2.1.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for doc-zero 0.2.1
File Interpreter ABI Platform
doc_zero-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / doc_zero-0.2.1.tar.gz

Download URL doc_zero-0.2.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0d93df1e510d355c5a0c0734aef530b5432c74dab6e2186d268053e22356fe73
BLAKE2b-256 checksum
How to use checksums
51561be5eae1f3f14691bd08e0a256d169a49337221ecdca08d2d7ebfb3aef5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / doc_zero-0.2.1-py3-none-any.whl

Download URL doc_zero-0.2.1-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e44a9bd5ceb1a1ee1091aed3a03182aa24039b5ba70317f3e3609f3bad72128
BLAKE2b-256 checksum
How to use checksums
a3de8e3bab0764f2a69547dc3c72a9576f4dff6d3e5c0bd4191bfa77920810f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.2.3

2 release files

0.2.2

2 release files

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page