Skip to main content
https://img.shields.io/pypi/v/autoclasstoc.svg https://img.shields.io/pypi/pyversions/autoclasstoc.svg https://img.shields.io/readthedocs/autoclasstoc.svg

It’s surprisingly difficult to document large Python classes in a way that’s easy for users to navigate. Most projects use the autodoc Sphinx plugin, which simply puts the complete documentation for each class member one after another. While this does fully document the class, it doesn’t give the user a quick way to see everything the class can do. This makes classes of even moderate complexity difficult to navigate. It also encourages projects to be stingy about which class members to include in the documentation (e.g. excluding special methods, inherited methods, private methods, and/or undocumented methods), to the further detriment of the user.

What’s needed is for each class to have a succinct table of contents (TOC) that:

  • Is organized into sections that will be meaningful to the user. Different projects and classes may call for different sections, e.g. public/private methods, methods that share a decorator, methods with a common prefix, etc.

  • Includes every method of the class (so that the documentation is complete), while still making it easy for the user to get a sense for what the class does and find what they’re looking for.

  • Collapses inherited methods. Complex classes in particular can inherit a lot of methods from their parent classes, and while these methods should be present in the TOC (since they’re part of the class), collapsing them makes it easier for the user to grok the functionality provided by the class itself.

autoclasstoc provides a new Restructured Text directive that is all of these things. It also works well with autodoc and autogen, and should be easy to incorporate into any existing project.

See the complete documentation for more information (including examples).

Release files for autoclasstoc 1.2.0

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

Source distribution (sdist)

Source distribution for autoclasstoc 1.2.0
File Size Uploaded
autoclasstoc-1.2.0.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autoclasstoc 1.2.0
File Interpreter ABI Platform
autoclasstoc-1.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 31.5 kB

Release files / autoclasstoc-1.2.0.tar.gz

Download URL autoclasstoc-1.2.0.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8d1445a5af965224d53500c4375be369064a798a6e7dae308d0286c42602a683
BLAKE2b-256 checksum
How to use checksums
93730995a1d93e51be8f43e8c4bbd4f8cfcda7901f7076998160bacb581381c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release files / autoclasstoc-1.2.0-py2.py3-none-any.whl

Download URL autoclasstoc-1.2.0-py2.py3-none-any.whl
Size 11.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6a1d312d1db89ac2e9ff6f43f6eebd6fdee4a46920375cfe1c03af522f781c99
BLAKE2b-256 checksum
How to use checksums
640475754ba896d0029a6ba091e452ad816c2584c5925afa514469fbbf918129
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release history Release notifications | RSS feed

1.7.0

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

This release

1.2.0 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

0.0.0

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