• Stars
    star
    415
  • Rank 100,788 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created over 13 years ago
  • Updated 7 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Observable typed attributes for Python classes

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:

  • 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.)

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.6.

Traits has the following optional dependencies:

  • NumPy to support the trait types for arrays.
  • TraitsUI to support GUI Views.

To build the full documentation one needs:

  • Sphinx version 2.1 or later.
  • The Enthought Sphinx Theme. (A version of the documentation can be built without this, but some formatting may be incorrect.)

More Repositories

1

mayavi

3D visualization of scientific data in Python
Python
1,251
star
2

pyql

Cython QuantLib wrappers
Cython
922
star
3

traitsui

TraitsUI: Traits-capable windowing framework
Python
294
star
4

chaco

Chaco is a Python package for building interactive and custom 2-D plots.
Python
290
star
5

comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Python
275
star
6

pyface

pyface: traits-capable windowing framework
Python
103
star
7

Numpy-Tutorial-SciPyConf-2019

Numpy-Tutorial-SciPyConf-2019
Python
97
star
8

enable

Enable: low-level drawing and interaction
C
92
star
9

envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
Python
80
star
10

scimath

Python
65
star
11

Numpy-Tutorial-SciPyConf-2018

SciPy 2018 NumPy tutorial
Python
56
star
12

codetools

Tools for Python code analysis and execution.
Python
50
star
13

jigna

HTML frontend for Traits models.
Python
39
star
14

apptools

Python
38
star
15

ets

ets.py is a utility to clone and manage various Enthought Tool Suite packages
Python
34
star
16

Numpy-Tutorial-SciPyConf-2020

Numpy-Tutorial-SciPyConf-2020
Jupyter Notebook
29
star
17

terraform-modules

Reusable terraform modules
HCL
26
star
18

graphcanvas

Python
25
star
19

qt_binder

Thinly wrap Qt widgets with Traits
Python
19
star
20

Numpy-Tutorial-SciPyConf-2021

Public GitHub repo for SciPy 2021 tutorial (Introduction to Numerical Computing With NumPy)
Jupyter Notebook
17
star
21

blockcanvas

Python
16
star
22

pywin32-ctypes

A (partial) reimplementation of pywin32 in pure python
Python
15
star
23

traits-enaml

A library to facilitate interoperation of Traits with Enaml > 0.8.x
Python
15
star
24

Numpy-Tutorial-SciPyConf-2022

Public GitHub repo for SciPy 2022 tutorial (Introduction to Numerical Computing With NumPy)
Jupyter Notebook
14
star
25

encore

A Collection of core-level utility modules for Enthought projects
Python
14
star
26

ibm2ieee

NumPy ufuncs for converting IBM-format hexadecimal floating-point to IEEE 754-format binary floating-point.
Python
9
star
27

traits-futures

Reactive background processing for TraitsUI applications
Python
8
star
28

ets-examples

Examples showing how the Enthought Tool Suite packages can work together.
Python
5
star
29

distarray

Default Repo description from terraform module
Python
5
star
30

blusky

BluSky
Jupyter Notebook
5
star
31

Numpy-Tutorial-SciPyConf-2023

Public GitHub repo for SciPy 2023 tutorial (Introduction to Numerical Computing With NumPy)
Jupyter Notebook
5
star
32

vpsearch

Fast similarity search for genomic sequences via vantage-point trees
Cython
4
star
33

ncurses-5.5

C
4
star
34

ensemble

High-level widgets for building Python applications
Python
4
star
35

etsproxy

Python
4
star
36

enaml

Default Repo description from terraform module
Python
3
star
37

sat-solver

Default Repo description from terraform module
Python
3
star
38

rested

Default Repo description from terraform module
Python
2
star
39

okonomiyaki

Okonomiyaki is aimed at consolidating a lot of our low-level code used for Enthought's eggs and python runtimes.
Python
2
star
40

traits4

Default Repo description from terraform module
Python
2
star
41

db

Default Repo description from terraform module
C
2
star
42

bzip2-1.0.6

Default Repo description from terraform module
C
2
star
43

Python-2.7.3

Default Repo description from terraform module
Python
2
star
44

tcl

Default Repo description from terraform module
C
1
star
45

appinst

Default Repo description from terraform module
C
1
star
46

scipy-refactor

Default Repo description from terraform module
C++
1
star
47

qt-mobility

Default Repo description from terraform module
C++
1
star
48

nfftpy

Default Repo description from terraform module
Python
1
star
49

setup-edm-action

Setup EDM for GitHub Actions CI
JavaScript
1
star
50

db-4.7.25

Default Repo description from terraform module
C
1
star
51

machotools

Default Repo description from terraform module
Python
1
star
52

graph

Default Repo description from terraform module
C
1
star
53

gom-jabbar

gom-jabbar ๐Ÿœ๐Ÿ› - Unit testing for NGSPICE code models
Python
1
star
54

glfwpy

Default Repo description from terraform module
Python
1
star
55

Numpy-Tutorial-SciPyConf-2015

Default Repo description from terraform module
Python
1
star
56

ctraits

Default Repo description from terraform module
Python
1
star
57

etsdevtools

Default Repo description from terraform module
Python
1
star
58

pikos

Default Repo description from terraform module
Python
1
star