Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Autodoc extention for documenting traits

Project description

https://travis-ci.org/enthought/trait-documenter.svg?branch=master http://codecov.io/github/enthought/trait-documenter/coverage.svg?branch=master https://readthedocs.org/projects/trait-documenter/badge/?version=latest

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

Installation

Development versions can be found at https://github.com/enthought/trait-documenter.

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

Usage

Add the trait-documenter to the extensions variable in your conf.py:

extensions.append('trait_documenter')

Warning

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

Example

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


Release history Release notifications

This version
History Node

1.1.0

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
trait_documenter-1.1.0.tar.bz2 (14.5 kB) Copy SHA256 hash SHA256 Source None Nov 9, 2016
trait_documenter-1.1.0.tar.gz (15.6 kB) Copy SHA256 hash SHA256 Source None Nov 9, 2016
trait_documenter-1.1.0.zip (24.9 kB) Copy SHA256 hash SHA256 Source None Nov 9, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page