Sphinx extension: auto-generates API docs from Zope interfaces
Install via pip:
pip install repoze.sphinx.autointerface
Registering the Extension
Add repoze.sphinx.autointerface to the extensions list in the conf.py of the Sphinx documentation for your product.
extensions = [ "sphinx.ext.autodoc", "sphinx.ext.doctest", "repoze.sphinx.autointerface", ]
Using the Extension
At appropriate points in your document, call out the autodoc interface.
.. autointerface:: yourpackage.interfaces.IFoo
Output from the directive includes
the fully-qualified interface name
any base interfaces
the docstring from the interface, rendered as reStructuredText
the members of the interface (methods and attributes)
For each attribute, the output includes the attribute name and its description.
For each method, the output includes the method name, its signature, and its docstring (also rendered as reStructuredText).
Remove sphinx.util.force_decode. Previously we hacked it in to support Python 2 and Sphinx 3.x, but Sphinx 4.0 deprecated it and dropped Python 2 support.
Replace Travis-CI with GitHub Actions
Add support for Python 3.6, 3.7, 3.8, 3.9, 3.10, and PyPy3.
Drop support for Python 2.7, 3.3, 3.4, 3.5, and PyPy.
Update to work with newer Sphinx versions:
Sphinx.domains -> Sphinx.registry.domains
Sphinx.override_domain(D) -> Sphinx.add_domain(D, override=True)
Drop support for Sphinx < 4.0.
Add support for Python 3.3, 3.4, and 3.5.
Drop support for Python 2.6 and 3.2.
Allow cross references using the :class: directive to use the . for “fuzzy” searching. Thanks to Jason Madden for the patch.
Remove setup.py dependency on ez_setup.py.
Python 3.2+ compatibility. Thanks to Arfrever for the patch.
Include interface docs under the automodule directive. Thanks to Krys Lawrence for the patch.
Fix TypeError: 'NoneType' object is not iterable error when generating a rendering of an interface under Python 2.7.
Fix ‘:member-order: bysource’ handling.
Correctly handle ‘:members:’ values explicitly set in the directive.
Added support for the ‘:member-order:’ flag, which can take one of the three stock values, “alphabetical”, “groupwise”, or “bysource”. By default, members are documented in “hash” order.
Fixed compatibility with Sphinx 1.0
Un-break PyPI ReST/HTML-rendering again.
Refactor sphinx integration. There are now separate autointerface and interface directives.
Fix add_directive arguments to work with Sphinx 0.6.1, now required.
Coerce unicode path elements to str in _resolve_dotted_name. Note that non-ASCII path elements won’t work: this fix just deals with the case where the path was of type unicode.
Fixed spelling of directive in README.txt.
Added dependency on zope.interface.
Packaging change: improved description in README.txt.
Packaging bug: the long_description was not rendering properly to HTML on PyPI.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for repoze.sphinx.autointerface-1.0.0.tar.gz
Hashes for repoze.sphinx.autointerface-1.0.0-py3-none-any.whl