Skip to main content
https://travis-ci.org/twisted/pydoctor.svg?branch=tox-travis-2 https://codecov.io/gh/twisted/pydoctor/branch/master/graph/badge.svg

This is pydoctor, an API documentation generator that works by static analysis.

It was written primarily to replace epydoc for the purposes of the Twisted project as epydoc has difficulties with zope.interface. If you are looking for a successor to epydoc after moving to Python 3, pydoctor might be the right tool for your project as well.

pydoctor puts a fair bit of effort into resolving imports and computing inheritance hierarchies and, as it aims at documenting Twisted, knows about zope.interface’s declaration API and can present information about which classes implement which interface, and vice versa.

Usage

You can run pydoctor on your project like this:

$ pydoctor --make-html --html-output=docs/api --add-package=src/mylib

You can see the full list of options using pydoctor --help.

Markup

pydoctor currently supports the following markup languages in docstrings:

epytext (default)

The markup language of epydoc. Simple and compact.

reStructuredText

The markup language used by Sphinx. More expressive than epytext, but also slighly more complex and verbose.

plain text

Text without any markup.

You can select a different format using the --docformat option.

Sphinx Integration

Sphinx object inventories can be used to create deep links between API documentation generated by pydoctor and by Sphinx.

Linking to external API docs

It can link to external API documentation using a Sphinx objects inventory with the following cumulative configuration option:

--intersphinx=http://sphinx-doc.org/objects.inv

Linking to your API docs

pydoctor’s HTML generator will also generate a Sphinx objects inventory using the following mapping:

  • packages, modules -> py:mod:

  • classes -> py:class:

  • functions -> py:func:

  • methods -> py:meth:

  • attributes -> py:attr:

To use this mapping in Sphinx, configure the intersphinx extension:

intersphinx_mapping = {
    'pydoctor': ('http://domain.tld/api', None),
}

And use external references:

:py:func:`External API <pydoctor:pydoctor.model.Documentable.reparent>`

:py:mod:`pydoctor:pydoctor`
:py:mod:`pydoctor:pydoctor.model`
:py:func:`pydoctor:pydoctor.driver.getparser`
:py:class:`pydoctor:pydoctor.model.Documentable`
:py:meth:`pydoctor:pydoctor.model.Documentable.reparent`
:py:attr:`pydoctor:pydoctor.model.Documentable.kind`

What’s New?

pydoctor 20.7.2

  • Fix handling of external links in reStructuredText under Python 3

  • Fix reporting of errors in reStructuredText under Python 3

  • Restore syntax highlighting of Python code blocks

pydoctor 20.7.1

  • Fix cross-reference links to builtin types in standard library

  • Fix and improve error message printed for unknown fields

pydoctor 20.7.0

  • Python 3 support

  • Type annotations on attributes are supported when running on Python 3

  • Type comments on attributes are supported when running on Python 3.8+

  • Type annotations on function definitions are not supported yet

  • Undocumented attributes are now included in the output

  • Attribute docstrings: a module, class or instance variable can be documented by a following it up with a docstring

  • Improved error reporting: more errors are reported, error messages include file name and line number

  • Dropped support for implicit relative imports

  • Explicit relative imports (using from) no longer cause warnings

  • Dropped support for index terms in epytext (X{}); this was never supported in any meaningful capacity, but now the tag is gone

This will be the last major release to support Python 2.7 and 3.5: future major releases will require Python 3.6 or later.

Metadata

Release files for pydoctor 20.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydoctor 20.7.2
File Size Uploaded
pydoctor-20.7.2.tar.gz 112.6 kB Details

Release files / pydoctor-20.7.2.tar.gz

Download URL pydoctor-20.7.2.tar.gz
Size 112.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5d40f35ea4dc31f523c19767447f7a45a0e73ec17d8e8cc3a460d5350e56d2a3
BLAKE2b-256 checksum
How to use checksums
cc81de975884d98cbc3fdafd1b63dc3ff99192436c14cc13cbe116f41d32731f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.15

Release history Release notifications | RSS feed

25.4.0

2 release files

24.3.3

2 release files

23.9.0

2 release files

23.4.1

2 release files

22.9.1

2 release files

22.9.0

2 release files

22.7.0

2 release files

22.5.0

2 release files

22.4.0

2 release files

22.3.0

2 release files

22.2.2

2 release files

22.2.1

2 release files

22.2.0

2 release files

21.9.2

2 release files

21.9.0

2 release files

21.2.0

2 release files

This release

20.7.2 This release

1 release file

20.7.1

1 release file

20.7.0

1 release file

16.3.0

1 release file

16.2.1

1 release file

16.2.0

1 release file

16.1.1

1 release file

16.1.0

1 release file

16.0.0

1 release file

15.1.0

2 release files

15.0.0

1 release file

0.5

1 release file

0.4

1 release file

0.4a1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page