Skip to main content

Autodoc extention for documenting traits

Project description


.. image::

.. image::

.. image::

Trait-Documenter is an autodoc extension to allow trait definitions to be
properly rendered in sphinx.


Developments versions can be found in `github <>`_.

The package requires a recent version of *sphinx*, *traits* and *astor* to function properly.


Add the trait-documenter to the extensions variable in your **::


.. warning::

Using the TraitDocumenter in conjunction with the TraitsDoc package
is not advised.


A class trait with a docstring::

from traits.api import HasTraits, Float

class MyClass(HasTraits):

#: A float number.
number = Float(2.0)

Will be rendered as:

.. py:attribute:: number
:annotation: = Float(2.0)

A float number.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for trait_documenter, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size (17.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page