Skip to main content

An extension for sphinx to allow automatic documentation of `variants` functions.

Project description

An extension for sphinx to allow automatic documentation of variants functions.


The default sphinx.ext.autodoc module does not handle function groups with variants created by the variants module correctly. This extension registers an automatic documenter that detects variant functions and methods and enables documentation of both the primary and variant functions.

To use this with your project that uses variants, first install this extension with pip (or, preferably, add this to the documentation dependencies):

pip install sphinx_autodoc_variants

With this installed, add 'sphinx_autodoc_variants' to the extensions variable of your, e.g.:

extensions = ['sphinx.ext.autodoc',

This will enable proper documentation of variants functions under .. automodule or other autodoc directives.

If you want to explicitly document a variants function group, use .. autoprimary_function for functions and .. autoprimary_method for methods.

Project details

Download files

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

Files for sphinx-autodoc-variants, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sphinx_autodoc_variants-0.1.0-py2.py3-none-any.whl (4.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size sphinx_autodoc_variants-0.1.0.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page