link_traits
link_traits is a fork of traitlets' link and dlink functions to add the ability to link traits in addition to traitlets.
Installation
Make sure you have pip installed and run:
pip install link_traits
link_traits depends on traits which is not a pure Python package. In Anaconda you can install link_traits and traits as follows:
conda install link-traits -c conda-forge
Running the tests
py.test is required to run the tests.
pip install "link_traits[test]"
py.test --pyargs traitlets
Usage
import traits.api as t
import traitlets
from link_traits import link
class A(t.HasTraits):
a = t.Int()
class B(traitlets.HasTraits):
b = t.Int()
a = A()
b = B()
l = link((a, "a"), (b, "b"))
>>> a.a = 3
>>> b.b
3
Development
Contributions through pull requests are welcome. The intention is to keep the syntax and features in sync with the original traitlets' link and dlink functions. Therefore, before contributing a new feature here, please contribute it to traitlets first.
Metadata
Release files for link-traits 1.0.3
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 |
|---|---|---|---|---|
| link_traits-1.0.3.tar.gz | 7.1 kB | Without provenance | Details for link_traits-1.0.3.tar.gz |
Release files / link_traits-1.0.3.tar.gz
| Download URL | link_traits-1.0.3.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e1f104ce3bcb9a1c16f838d19ff45ec7be9704df6565690de19b0a05d5820a9
|
|
BLAKE2b-256 checksum How to use checksums |
0317eb40ed2030e2c6dad5050216e124d5d1c9512bc1085353c83111599c2ee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|
Security for link-traits 1.0.3
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.