Traits Futures allows a TraitsUI-based GUI application to execute one or more background tasks without blocking the main GUI, and provides a mechanism for that application to safely update the GUI in response to full or partial results from the background tasks.
Detailed description
GUI applications that want to perform a long-running task in response to user interactions (for example, running a time-consuming calculation, or submitting a complex search query to a remote database) face two major issues:
If the task is executed directly on the main thread, it blocks the GUI event loop, making the entire application appear unresponsive to the user.
It’s not generally safe to update a GUI directly from a worker thread, so a task run on a worker thread needs to find a way to safely communicate events back to the main GUI thread.
For TraitsUI-based applications, Traits Futures provides a solution to these issues, similar in principle to the Python standard library concurrent.futures package. Tasks are submitted to an executor, and on task submission the executor immediately returns a “future” object. That “future” object has observable attributes (“traits”) representing the application’s view of the state of the background task. Rather than waiting on the future’s state, an interested observer can listen to updates to those traits and update the GUI state as necessary when changes occur. The Traits Futures machinery ensures that updates to the future’s traits always occur on the main thread, freeing observers from thread-safety concerns.
For further information, see the documentation pages at https://docs.enthought.com/traits-futures/.
Metadata
Release files for traits-futures 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| traits_futures-0.3.1.tar.gz | 1.4 MB | Without provenance | Details for traits_futures-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| traits_futures-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for traits_futures-0.3.1-py3-none-any.whl |
Total release size: 1.5 MB
Release files / traits_futures-0.3.1.tar.gz
| Download URL | traits_futures-0.3.1.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47f414541cf2ebbba5c0a8595aec76083a4fa16d441f05bde8b7436ece19c71d
|
|
BLAKE2b-256 checksum How to use checksums |
c49fbe70d6a45b3646e9700236761d8fe9ca227994a80c2ab29e1d2f1a8c63d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11
|
Release files / traits_futures-0.3.1-py3-none-any.whl
| Download URL | traits_futures-0.3.1-py3-none-any.whl |
|---|---|
| Size | 110.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b57a1cb40c528e17afc3bdd606ca7cc0340b715334085e425626231295e78e8
|
|
BLAKE2b-256 checksum How to use checksums |
c6a75b8fbf9208c59252a0d336f8ec8cfe07dda199ff5659b6fac62bf15fdbca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11
|
Security for traits-futures 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.