Annoy Index Architecture (Inheritance Diagrams)#
This page shows the class inheritance structure for the Annoy backend and the
high-level Index facade, using Sphinx’s built-in
inheritance diagram support (the same approach used in Matplotlib’s docs).
Note
Enable the extension and ensure Graphviz is available:
extensions += ["sphinx.ext.inheritance_diagram"]
The directive renders via Graphviz (dot). Install Graphviz in your build
environment if it is missing.
Index + backend + mixins (public view)#

Reading this diagram
Mixins only (independence + MRO scan)#
This diagram focuses only on the mixins so you can quickly confirm there is no unexpected inheritance between mixins (they should be independent).

Notes and limitations#
Inheritance diagrams show class derivation, but they do not show composition
relationships (e.g., an optional self._annoy backend attribute). For composition
support, refer to the “glue” helpers documented elsewhere (e.g., backend_for(self),
lock_for(self)).
See Also#
sphinx.ext.inheritance_diagramGraphviz (
dot) documentation