Skip to main content

Sphinx extension to auto-generate API tree.

Project description

sphinx-apitree

Unittests PyPI version

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

Installation in a project

  1. In pyproject.toml

    [project.optional-dependencies]
    # Installed through `pip install .[docs]`
    docs = [
        # Install `apitree` with all extensions (sphinx, theme,...)
        "sphinx-apitree[ext]",
    ]
    
  2. In .readthedocs.yaml

    sphinx:
    configuration: docs/conf.py
    
    python:
    install:
        - method: pip
        path: .
        extra_requirements:
            - docs
    

Examples of projects using apitree

Project details


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.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

sphinx_apitree-1.3.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_apitree-1.3.0.tar.gz.

File metadata

  • Download URL: sphinx_apitree-1.3.0.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

Hashes for sphinx_apitree-1.3.0.tar.gz
Algorithm Hash digest
SHA256 50efe80bbce3a3297ceebe789950b8cb5b2e81030f1054e1b04b9f7b5e10f800
MD5 965b91f768a0898e779a329f2c935dca
BLAKE2b-256 4d487b3af782ea7dce58062c3cc56be63574852aa316be6f1163a460c50352ef

See more details on using hashes here.

File details

Details for the file sphinx_apitree-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_apitree-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4370042360c35a3bb50401aa4592b981d89787ab7a0ecf55709e431b6ea7a1f6
MD5 cc70357056add77d0666d98b59f08665
BLAKE2b-256 56d3fc4af7361be1b95a8ac220e944bbb803f7d8177d42b744d0406014f0460c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page