python-traits4 – Manifest typing and reactive programming for Python

The traits package provides a metaclass with special attributes that are called traits. A trait is a type definition that can be used for normal Python object attributes, giving the attributes some additional characteristics:

  • Initialization: A trait attribute can have a default value
  • Validation: A trait attribute is manifestly typed.
  • Delegation: The value of a trait attribute can be contained in another object
  • Notification: Setting the value of a trait attribute can fired callbacks
  • Visualization: With the TraitsUI package, GUIs can be generated automatically from traited objects.
Package availability chart
Distribution Base version Our version Architectures
Debian GNU/Linux 10.0 (buster) 4.6.0-1    
Debian GNU/Linux 9.0 (stretch) 4.6.0-1 4.0.0-1~cbp0~nd70+1+nd90+1 i386, amd64
Debian testing (bullseye) 5.2.0-2    
Debian unstable (sid) 5.2.0-2    
Ubuntu 16.04 “Xenial Xerus” (xenial) 4.5.0-1ubuntu2    
Ubuntu 18.04 “Bionic Beaver” (bionic) 4.6.0-1ubuntu2    
Ubuntu 20.04 “Focal Fossa” (focal) 5.2.0-2build1    
Ubuntu 20.10 “Groovy Gorilla” (groovy) 5.2.0-2build1    

Comments

blog comments powered by Disqus