• Stars
    star
    411
  • Rank 103,016 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A new approach to API documentation in Sphinx.

Sphinx AutoAPI

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

Sphinx AutoAPI is a Sphinx extension for generating complete API documentation without needing to load, run, or import the project being documented.

In contrast to the traditional Sphinx autodoc, which requires manual authoring and uses code imports, AutoAPI finds and generates documentation by parsing source code.

Language Support

Warning

Support for all languages other than Python will be removed in the next major version!

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.

More Repositories

1

readthedocs.org

The source code that powers readthedocs.org
Python
7,860
star
2

sphinx_rtd_theme

Sphinx theme for readthedocs.org
Sass
4,658
star
3

recommonmark

A markdown parser for docutils
Python
339
star
4

tutorial-template

Template for the Read the Docs tutorial
Python
303
star
5

commonmark.py

DEPRECATED: Python CommonMark parser
Python
241
star
6

ethical-ad-server

The ethical ad server - ads for developers without all the tracking
Python
180
star
7

template

A template Sphinx repo
116
star
8

readthedocs-docker-images

Docker image definitions used by Read the Docs
Dockerfile
113
star
9

sphinx-hoverxref

Sphinx extension to show tooltips with content embedded when hover a reference.
Python
93
star
10

ethical-ad-client

Ethical Ads JavaScript client
JavaScript
60
star
11

sphinx-notfound-page

Create a custom 404 page with absolute URLs hardcoded
Python
42
star
12

tutorial-sphinx-markdown

Jupyter Notebook
33
star
13

ethicalads.io

This repository contains the public marketing website for EthicalAds. The ad server is in the ethical-ad-server repository.
CSS
33
star
14

readthedocs-sphinx-search

Enable search-as-you-type feature for docs hosted by RTD.
Python
32
star
15

actions

GitHub Actions for Read the Docs
JavaScript
31
star
16

pydoc.io

A browser for Python project documentation
Python
25
star
17

ads-for-opensource

An Adblock/AdblockPlus/uBlock compatible filter list for allowing advertising that benefits open source
Python
21
star
18

readthedocs-build

Work in Progress builder
Python
19
star
19

common

Shared bits around multiple repositories
Python
19
star
20

blog

Read the Docs blog
CSS
18
star
21

readthedocs-sphinx-ext

[RTD Internal] This is an extension that we install on all Sphinx builds on Read the Docs
Python
17
star
22

sphinxcontrib-dotnetdomain

A Sphinx domain for .NET languages
Python
15
star
23

website

The Read the Docs community website
HTML
14
star
24

addons

JavaScript client to integrate with Read the Docs nicely
JavaScript
14
star
25

guidelines

Style, brand, and development guidelines
Makefile
13
star
26

livesphinx

A fork of rst.ninjs.org to support Sphinx
CSS
13
star
27

godocjson

Generate json from go.
Go
9
star
28

rtd-sphinx-themes-examples

A project illustrating different Sphinx themes locally and on Read the Docs
Python
7
star
29

tutorial-sphinx-markdown-library

Python
7
star
30

web

Different scenarios (one per branch) to test different build configs on production
7
star
31

apitheme

Sphinx API documentation theme
JavaScript
6
star
32

bot

Bot for Read the Docs monitoring
JavaScript
5
star
33

sphinx-multiproject

Share a single conf.py file between several Sphinx projects
Python
4
star
34

sphinxcontrib-multisrc

Sphinx multiple source path support
Python
2
star
35

time-test

A test repo for Read the Docs
Python
2
star
36

readthedocs-assistant

Python
2
star
37

site-community-images

Source images for our website graphics
Makefile
1
star
38

rtd-mkdocs-test

A Project for testing versions of MkDocs on Read the Docs
1
star
39

analytical

Analytics done server side
Python
1
star
40

validatehttp

HTTP response validation application
Python
1
star
41

test-sphinx-theme

JavaScript
1
star
42

rtd-git-stresstest

A stress test for git on Read the Docs
Python
1
star
43

sui-common-theme

Shared base SUI theme for our website and application
1
star
44

abandoned-project

A repo to build docs for abandoned projects
1
star
45

ext-theme

Read the Docs drop in replacement site templates
HTML
1
star