Skip to main content

Sphinx API documentation generator

Project description

Documentation Github Build Status PyPI Version Supported Python Versions Formatted with Black

Sphinx AutoAPI provides “autodoc” style documentation for multiple programming languages without needing to load, run, or import the project being documented.

In contrast to the traditional Sphinx autodoc, which is Python-only and uses code imports, AutoAPI finds and generates documentation by parsing source code.

Language Support

Language

Status

Parser

Python

Stable

Custom using astroid

Go

Alpha

godocjson

Javascript

Alpha

jsdoc

.NET

Alpha

docfx

Getting Started

The following steps will walk through how to add AutoAPI to an existing Sphinx project. For instructions on how to set up a Sphinx project, see Sphinx’s documentation on Getting Started.

Installation

AutoAPI can be installed through pip:

pip install sphinx-autoapi

Next, add and configure AutoAPI in your Sphinx project’s conf.py. Other languages may require further configuration:

extensions.append('autoapi.extension')

autoapi_type = 'python'
autoapi_dirs = ['path/to/source/files', 'src']

Where autoapi_type can be one of any of the supported languages:

Language

autoapi_type

Python

'python'

Go

'go'

Javascript

'javascript'

.NET

'dotnet'

When the documentation is built, AutoAPI will now generate API documentation into an autoapi/ directory and add an entry to the documentation in your top level table of contents!

To configure AutoAPI behaviour further, see the Configuration documentation.

Contributing

Running the tests

Tests are executed through tox.

tox

Code Style

Code is formatted using black.

You can check your formatting using black’s check mode:

tox -e formatting

You can also get black to format your changes for you:

black autoapi/ tests/

You can even get black to format changes automatically when you commit using pre-commit:

pip install pre-commit
pre-commit install

Release Notes

Release notes are managed through towncrier. When making a pull request you will need to create a news fragment to document your change:

tox -e release_notes -- create --help

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License. See the LICENSE.rst file for details.

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-autoapi-2.1.0.tar.gz (42.2 MB view details)

Uploaded Source

Built Distribution

sphinx_autoapi-2.1.0-py2.py3-none-any.whl (53.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sphinx-autoapi-2.1.0.tar.gz.

File metadata

  • Download URL: sphinx-autoapi-2.1.0.tar.gz
  • Upload date:
  • Size: 42.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for sphinx-autoapi-2.1.0.tar.gz
Algorithm Hash digest
SHA256 5b5c58064214d5a846c9c81d23f00990a64654b9bca10213231db54a241bc50f
MD5 f399564a5206128417056c72797d6222
BLAKE2b-256 59af074bc9457b1802bb9f4d5eabe5ed2082a16be3c8bab87c0dece5806228c7

See more details on using hashes here.

Provenance

File details

Details for the file sphinx_autoapi-2.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_autoapi-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b25c7b2cda379447b8c36b6a0e3bdf76e02fd64f7ca99d41c6cbdf130a01768f
MD5 b8ca393f39c39f3e3479a43b8d1ffd64
BLAKE2b-256 115ef577a9390e89ad4cc302cda5fafaedcf48619e6d61368fe7988d157bfd87

See more details on using hashes here.

Provenance

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