enthought / traits

Observable typed attributes for Python classes
Other
432 stars 85 forks source link
attributes dataclasses gui observer-pattern python runtime-typechecking types

====================================================== Traits: observable typed attributes for Python classes

http://docs.enthought.com/traits

The Traits project is at the center of all Enthought Tool Suite development and has changed the mental model used at Enthought for programming in the already extremely efficient Python programming language. We encourage everyone to join us in enjoying the productivity gains from using such a powerful approach.

The Traits project allows Python programmers to use a special kind of type definition called a trait, which gives object attributes some additional characteristics:

A class can freely mix trait-based attributes with normal Python attributes, or can opt to allow the use of only a fixed or open set of trait attributes within the class. Trait attributes defined by a class are automatically inherited by any subclass derived from the class.

Dependencies

Traits requires Python >= 3.8.

Traits has the following optional dependencies:

To build the full documentation one needs: