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).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoclasstoc-1.6.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoclasstoc-1.6.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file autoclasstoc-1.6.0.tar.gz.

File metadata

  • Download URL: autoclasstoc-1.6.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.8

File hashes

Hashes for autoclasstoc-1.6.0.tar.gz
Algorithm Hash digest
SHA256 fb5efe64ff5013ea559a4934375f62f9d94e76deb6d59c0742d30190eadb8f0c
MD5 89c5bbf900f8a98d2f8740ca1afe9db6
BLAKE2b-256 2474ba07337d847b083f0a4361eea2dc9fe2d86f15492bf5aeae9cdc15d624b6

See more details on using hashes here.

File details

Details for the file autoclasstoc-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: autoclasstoc-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.8

File hashes

Hashes for autoclasstoc-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22a358d415fdcc6f3f4ca352d0828809dcd2384f61813256a0236779b352df2c
MD5 864c528c5bb5232409ec4fe874926555
BLAKE2b-256 f5c06fb2481e2e3c2709eb9e2ea2bca88345174b94550620c499f0cb4e0ddb57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page