CMD + K

traits

Anaconda Verified

Observable typed attributes for Python classes

Installation

To install this package, run one of the following:

Conda
$conda install main::traits

Usage Tracking

7.1.0
7.0.2
6.2.0
6.1.1
6.1.0
5 / 8 versions selected
Downloads (Last 6 months): 0

Description

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

Initialization: A trait has a default value, which is automatically set as the initial value of an attribute before its first use in a program.

Validation: The type of a trait attribute is explicitly declared. The type is evident in the code, and only values that meet a programmer-specified set of criteria (i.e., the trait definition) can be assigned to that attribute.

Delegation: The value of a trait attribute can be contained either in the defining object or in another object delegated to by the trait.

Notification: Setting the value of a trait attribute can notify other parts of the program that the value has changed.

Visualization: User interfaces that allow a user to interactively modify the value of a trait attribute can be automatically constructed using the trait’s definition. (This feature requires that a supported GUI toolkit be installed. If this feature is not used, the Traits project does not otherwise require GUI support.)

About

Summary

Observable typed attributes for Python classes

Last Updated

Jan 9, 2026 at 20:34

License

BSD-3-Clause

Total Downloads

5.4K

Supported Platforms

macOS-arm64
linux-64
linux-aarch64
win-64

Unsupported Platforms

linux-ppc64le Last supported version: 6.2.0
win-32 Last supported version: 6.2.0
linux-s390x Last supported version: 7.0.2
macOS-64 Last supported version: 7.0.2
linux-32 Last supported version: 4.6.0