Skip to main content

TraitsUI: Traits-capable windowing framework

The TraitsUI project contains a toolkit-independent GUI abstraction layer, which is used to support the “visualization” features of the Traits package. Thus, you can write model in terms of the Traits API and specify a GUI in terms of the primitives supplied by TraitsUI (views, items, editors, etc.), and let TraitsUI and your selected toolkit and back-end take care of the details of displaying them.

The following GUI backends are supported:

  • wxPython

  • PyQt

  • PySide

Warning: In TraitsUI version 5.0 the default GUI backend will change from wx to qt4.

Example

Given a Traits model like the following:

from traits.api import HasTraits, Str, Range, Enum

class Person(HasTraits):

    name = Str('Jane Doe')

    age = Range(low=0)

    gender = Enum('female', 'male')

person = Person(age=30)

we can use TraitsUI to specify a and display a GUI view:

from traitsui.api import Item, RangeEditor, View

person_view = View(
    Item('name'),
    Item('gender'),
    Item('age', editor=RangeEditor(mode='spinner')),
    buttons=['OK', 'Cancel'],
    resizable=True,
)

person.configure_traits(view=person_view)

which creates a GUI which looks like this:

README_example.png

Prerequisites

If you want to run traitsui, you must also install:

Metadata

Release files for traitsui 5.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for traitsui 5.0.0
File Size Uploaded
traitsui-5.0.0.zip 5.4 MB Details
traitsui-5.0.0.tar.gz 5.1 MB Details
traitsui-5.0.0.tar.bz2 5.1 MB Details

Release files / traitsui-5.0.0.zip

Download URL traitsui-5.0.0.zip
Size 5.4 MB
Tags Source
SHA-256 checksum
How to use checksums
6b527436fb61e2d9ad7798f78642f1fea535239998308c877d6d1cc600b14cf6
BLAKE2b-256 checksum
How to use checksums
e1c336676dad888f452b91d9b622b1591a7334d4c846808b83001db185488ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / traitsui-5.0.0.tar.gz

Download URL traitsui-5.0.0.tar.gz
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
68f73555c265c847b92a760d537a8e6e6db006e2d2ebb3a118a31008c5403abb
BLAKE2b-256 checksum
How to use checksums
4776c56656ddc363b5f2969205a340313e0b99072d9f6c9e2d2a512226e3af4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / traitsui-5.0.0.tar.bz2

Download URL traitsui-5.0.0.tar.bz2
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
8ecee473b38cb108fb6720e9bf836c468e1113b0bfcc9e5a1fc403865778198f
BLAKE2b-256 checksum
How to use checksums
c0859c13850458441c9f4556c145436b168c7350dd1d4d4eaa41ab515bc32fa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

8.0.0

2 release files

7.4.3

2 release files

7.4.2

2 release files

7.4.1

2 release files

7.4.0

2 release files

7.3.1

2 release files

7.3.0

2 release files

7.2.1

1 release file

7.2.0

1 release file

7.1.1

1 release file

7.1.0

1 release file

7.0.1

1 release file

7.0.0

1 release file

6.1.3

1 release file

6.1.2

1 release file

6.1.1

1 release file

6.1.0

1 release file

6.0.0

1 release file

5.1.0

3 release files

This release

5.0.0 This release

3 release files

4.5.1

3 release files

4.5.0

3 release files

4.4.0

1 release file

4.3.0

4.2.0

4.1.0

4.0.1

4.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page