{"id":20931816,"url":"https://github.com/hyperspy/link_traits","last_synced_at":"2025-05-13T19:33:37.705Z","repository":{"id":60721369,"uuid":"91467572","full_name":"hyperspy/link_traits","owner":"hyperspy","description":"A fork of traitlets' link and dlink that can link traits in addition to traitlets.","archived":false,"fork":false,"pushed_at":"2021-08-20T08:55:39.000Z","size":22,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-09-18T11:17:57.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperspy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-16T14:25:19.000Z","updated_at":"2021-08-20T08:55:44.000Z","dependencies_parsed_at":"2022-10-03T19:45:30.650Z","dependency_job_id":null,"html_url":"https://github.com/hyperspy/link_traits","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Flink_traits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Flink_traits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Flink_traits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Flink_traits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperspy","download_url":"https://codeload.github.com/hyperspy/link_traits/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225255898,"owners_count":17445423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T21:45:55.460Z","updated_at":"2024-11-18T21:45:56.091Z","avatar_url":"https://github.com/hyperspy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# link_traits\n[![Build Status](https://travis-ci.org/hyperspy/link_traits.svg?branch=master)](https://travis-ci.org/hyperspy/link_traits)\n[![Codecov branch](https://img.shields.io/codecov/c/github/hyperspy/link_traits/master.svg)](https://codecov.io/gh/hyperspy/link_traits)\n\n\n\n**link_traits** is a fork of [traitlets'](https://github.com/ipython/traitlets)\n**link** and **dlink** functions to add the ability to link\n[traits](https://github.com/enthought/traits) in addition to traitlets.\n\n\n## Installation\n\nMake sure you have\n[pip installed](https://pip.pypa.io/en/stable/installing/) and run:\n\n```bash\npip install link_traits\n```\n\n**link_traits** depends on **traits** which is not a pure Python package. In\n[Anaconda](http://continuum.io/anaconda) you can install link_traits and\ntraits as follows:\n\n```bash\nconda install link-traits -c conda-forge\n\n```\n\n## Running the tests\n\npy.test is required to run the tests.\n\n```bash\npip install \"link_traits[test]\"\npy.test --pyargs traitlets\n```\n\n## Usage\n\n```python\n\nimport traits.api as t\nimport traitlets\nfrom link_traits import link\n\nclass A(t.HasTraits):\n    a = t.Int()\n\nclass B(traitlets.HasTraits):\n    b = t.Int()\na = A()\nb = B()\nl = link((a, \"a\"), (b, \"b\"))\n```\n\n```python\n\u003e\u003e\u003e a.a = 3\n\u003e\u003e\u003e b.b\n3\n```\n\n## Development\n\nContributions through pull requests are welcome. The intention is to keep the\nsyntax and features in sync with the original traitlets' **link** and **dlink**\nfunctions. Therefore, before contributing a new feature here,\nplease contribute it to [traitlets](https://github.com/ipython/traitlets/)\nfirst.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperspy%2Flink_traits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperspy%2Flink_traits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperspy%2Flink_traits/lists"}