{"id":18614120,"url":"https://github.com/enthought/traits","last_synced_at":"2025-05-14T05:11:17.157Z","repository":{"id":1354235,"uuid":"1301745","full_name":"enthought/traits","owner":"enthought","description":"Observable typed attributes for Python classes","archived":false,"fork":false,"pushed_at":"2025-04-28T21:45:40.000Z","size":55928,"stargazers_count":451,"open_issues_count":233,"forks_count":85,"subscribers_count":63,"default_branch":"main","last_synced_at":"2025-05-04T05:02:33.236Z","etag":null,"topics":["attributes","dataclasses","gui","observer-pattern","python","runtime-typechecking","types"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"glycerine/go-capnproto","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enthought.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE-CC-BY-3.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-01-28T04:46:40.000Z","updated_at":"2025-04-26T08:26:41.000Z","dependencies_parsed_at":"2024-03-18T09:46:26.579Z","dependency_job_id":"13fc0bd7-ee32-49f0-b0cf-cb6771909b0f","html_url":"https://github.com/enthought/traits","commit_stats":{"total_commits":2977,"total_committers":110,"mean_commits":"27.063636363636363","dds":0.7836748404433994,"last_synced_commit":"872def363cac51c226073c56f3d76344168eb6dd"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Ftraits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Ftraits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Ftraits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Ftraits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enthought","download_url":"https://codeload.github.com/enthought/traits/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766779,"owners_count":21960990,"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":["attributes","dataclasses","gui","observer-pattern","python","runtime-typechecking","types"],"created_at":"2024-11-07T03:25:14.970Z","updated_at":"2025-05-14T05:11:12.147Z","avatar_url":"https://github.com/enthought.png","language":"Python","readme":"======================================================\nTraits: observable typed attributes for Python classes\n======================================================\n\nhttp://docs.enthought.com/traits\n\nThe Traits project is at the center of all Enthought Tool Suite development\nand has changed the mental model used at Enthought for programming in the\nalready extremely efficient Python programming language. We encourage everyone\nto join us in enjoying the productivity gains from using such a powerful\napproach.\n\nThe Traits project allows Python programmers to use a special kind of type\ndefinition called a *trait*, which gives object attributes some additional\ncharacteristics:\n\n- **Initialization**: A trait has a *default value*, which is\n  automatically set as the initial value of an attribute before its\n  first use in a program.\n- **Validation**: The type of a trait attribute is *explicitly declared*. The\n  type is evident in the code, and only values that meet a\n  programmer-specified set of criteria (i.e., the trait definition) can\n  be assigned to that attribute.\n- **Delegation**: The value of a trait attribute can be contained either\n  in the defining object or in another object *delegated* to by the\n  trait.\n- **Notification**: Setting the value of a trait attribute can *notify*\n  other parts of the program that the value has changed.\n- **Visualization**: User interfaces that allow a user to *interactively\n  modify* the value of a trait attribute can be automatically\n  constructed using the trait's definition. (This feature requires that\n  a supported GUI toolkit be installed. If this feature is not used, the\n  Traits project does not otherwise require GUI support.)\n\nA class can freely mix trait-based attributes with normal Python attributes,\nor can opt to allow the use of only a fixed or open set of trait attributes\nwithin the class. Trait attributes defined by a class are automatically\ninherited by any subclass derived from the class.\n\nDependencies\n------------\n\nTraits requires Python \u003e= 3.8.\n\nTraits has the following optional dependencies:\n\n* `NumPy \u003chttp://pypi.python.org/pypi/numpy\u003e`_ to support the trait types\n  for arrays.\n* `TraitsUI \u003chttps://pypi.python.org/pypi/traitsui\u003e`_ to support GUI\n  Views.\n\nTo build the full documentation one needs:\n\n* `Sphinx \u003chttps://pypi.org/project/Sphinx\u003e`_ version 2.1 or later.\n* The `Enthought Sphinx Theme \u003chttps://pypi.org/project/enthought-sphinx-theme\u003e`_.\n  (A version of the documentation can be built without this, but\n  some formatting may be incorrect.)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenthought%2Ftraits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenthought%2Ftraits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenthought%2Ftraits/lists"}