Skip to main content

Autodoc extention for documenting traits

Project description

Trait-Documenter
================

.. image:: https://travis-ci.org/enthought/trait-documenter.svg?branch=master
:target: https://travis-ci.org/enthought/trait-documenter

.. image:: http://codecov.io/github/enthought/trait-documenter/coverage.svg?branch=master
:target: http://codecov.io/github/enthought/trait-documenter?branch=master

.. image:: https://readthedocs.org/projects/trait-documenter/badge/?version=latest
:target: https://readthedocs.org/projects/trait-documenter/?badge=master


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

Installation
============

Developments versions can be found in `github <https://github.com/enthought/trait-documenter.git>`_.

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


Download files

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

Source Distribution

trait_documenter-1.0.0.zip (17.4 kB view details)

Uploaded Source

File details

Details for the file trait_documenter-1.0.0.zip.

File metadata

File hashes

Hashes for trait_documenter-1.0.0.zip
Algorithm Hash digest
SHA256 94be483538505bd2fb7657cceec47111c67f153d5c77e4b76af485320c631341
MD5 224baca855d2e32b806fc7c17878c47b
BLAKE2b-256 28898f2cbd0d4892f585d16ef403d191724184a3347f7fabf87aad4a69a5cf9d

See more details on using hashes here.

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