Sphinx extension to auto-generate API tree.
Project description
sphinx-apitree
apitree
is a small library to generate a ready-to-use documentation with minimal friction!
apitree
takes care of everything, so you can only focus on the code.
Usage
In docs/conf.py
, replace everything by:
import apitree
apitree.make_project(
# e.g. `import visu3d as v3d` -> {'v3d': 'visu3d'}
project_name={'alias': 'my_module'},
globals=globals(),
)
Then to generate the doc:
sphinx-build -b html docs/ docs/_build
To add api/my_module/index
somewhere in your toctree, like:
..toctree:
:caption: API
api/my_module/index
Features
- Theme
- Auto-generate the API tree, with better features
- Do not require
__all__
(smart detect of which symbols are documented) - Add expandable toc tree with all symbols
- Do not require
- ...
Installation in a project
-
In
pyproject.toml
[project.optional-dependencies] # Installed through `pip install .[docs]` docs = [ # Install `apitree` with all extensions (sphinx, theme,...) "sphinx-apitree[ext]", ]
-
In
.readthedocs.yaml
sphinx: configuration: docs/conf.py python: install: - method: pip path: . extra_requirements: - docs
Examples of projects using apitree
- https://github.com/google-research/visu3d (https://visu3d.readthedocs.io/)
- https://github.com/google-research/dataclass_array (https://dataclass-array.readthedocs.io/)
- https://github.com/google-research/etils (https://etils.readthedocs.io/)
- https://github.com/google-research/kauldron (https://kauldron.readthedocs.io/)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sphinx_apitree-1.3.1.tar.gz
(16.4 kB
view details)
Built Distribution
File details
Details for the file sphinx_apitree-1.3.1.tar.gz
.
File metadata
- Download URL: sphinx_apitree-1.3.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b698db78a1ee335428305bd4a4e51c8a55c595e3c1e402ee1d0f4ba6209b4942 |
|
MD5 | 3c3c47370934e306922ec77ac12dd033 |
|
BLAKE2b-256 | 807057dcdd6f60e20763a47b4549b1f92782cbb7b58eaf3131ad4cdcf5e8670f |
File details
Details for the file sphinx_apitree-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: sphinx_apitree-1.3.1-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29f6bd9c87bd5762e86dae1ad872d7c6cc70042bb7396718dd42c0e7bfdcaa80 |
|
MD5 | 64685e364fe44fab6ee64dc8a137918e |
|
BLAKE2b-256 | 277be935945e0b8612e8dcc96643434454f67736c8da80f23b5b82c138914046 |