traits


Nametraits JSON
Version 6.4.3 PyPI version JSON
download
home_pagehttp://docs.enthought.com/traits
SummaryObservable typed attributes for Python classes
upload_time2023-10-09 13:39:13
maintainer
docs_urlNone
authorEnthought
requires_python>=3.7
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ======================================================
Traits: observable typed attributes for Python classes
======================================================

http://docs.enthought.com/traits

The Traits project is at the center of all Enthought Tool Suite development
and has changed the mental model used at Enthought for programming in the
already extremely efficient Python programming language. We encourage everyone
to join us in enjoying the productivity gains from using such a powerful
approach.

The Traits project allows Python programmers to use a special kind of type
definition called a *trait*, which gives object attributes some additional
characteristics:

- **Initialization**: A trait has a *default value*, which is
  automatically set as the initial value of an attribute before its
  first use in a program.
- **Validation**: The type of a trait attribute is *explicitly declared*. The
  type is evident in the code, and only values that meet a
  programmer-specified set of criteria (i.e., the trait definition) can
  be assigned to that attribute.
- **Delegation**: The value of a trait attribute can be contained either
  in the defining object or in another object *delegated* to by the
  trait.
- **Notification**: Setting the value of a trait attribute can *notify*
  other parts of the program that the value has changed.
- **Visualization**: User interfaces that allow a user to *interactively
  modify* the value of a trait attribute can be automatically
  constructed using the trait's definition. (This feature requires that
  a supported GUI toolkit be installed. If this feature is not used, the
  Traits project does not otherwise require GUI support.)

A class can freely mix trait-based attributes with normal Python attributes,
or can opt to allow the use of only a fixed or open set of trait attributes
within the class. Trait attributes defined by a class are automatically
inherited by any subclass derived from the class.

Dependencies
------------

Traits requires Python >= 3.7.

Traits has the following optional dependencies:

* `NumPy <http://pypi.python.org/pypi/numpy>`_ to support the trait types
  for arrays.
* `TraitsUI <https://pypi.python.org/pypi/traitsui>`_ to support GUI
  Views.

To build the full documentation one needs:

* `Sphinx <https://pypi.org/project/Sphinx>`_ version 2.1 or later.
* The `Enthought Sphinx Theme <https://pypi.org/project/enthought-sphinx-theme>`_.
  (A version of the documentation can be built without this, but
  some formatting may be incorrect.)

            

Raw data

            {
    "_id": null,
    "home_page": "http://docs.enthought.com/traits",
    "name": "traits",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Enthought",
    "author_email": "info@enthought.com",
    "download_url": "https://files.pythonhosted.org/packages/b1/08/ab5a95c4e3f7ebff53c4b58cdeee5ad161a8a285e02620928ff566185a48/traits-6.4.3.tar.gz",
    "platform": null,
    "description": "======================================================\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 >= 3.7.\n\nTraits has the following optional dependencies:\n\n* `NumPy <http://pypi.python.org/pypi/numpy>`_ to support the trait types\n  for arrays.\n* `TraitsUI <https://pypi.python.org/pypi/traitsui>`_ to support GUI\n  Views.\n\nTo build the full documentation one needs:\n\n* `Sphinx <https://pypi.org/project/Sphinx>`_ version 2.1 or later.\n* The `Enthought Sphinx Theme <https://pypi.org/project/enthought-sphinx-theme>`_.\n  (A version of the documentation can be built without this, but\n  some formatting may be incorrect.)\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Observable typed attributes for Python classes",
    "version": "6.4.3",
    "project_urls": {
        "Documentation": "https://docs.enthought.com/traits",
        "Download": "https://pypi.python.org/pypi/traits",
        "Homepage": "http://docs.enthought.com/traits",
        "Issue Tracker": "https://github.com/enthought/traits/issues",
        "Source Code": "https://github.com/enthought/traits"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b108ab5a95c4e3f7ebff53c4b58cdeee5ad161a8a285e02620928ff566185a48",
                "md5": "43a96b3f6effb8312a41365106d67e50",
                "sha256": "a9bbfd9e0c08b7de07e86ef64e69cb96a29c2105a43bf832cd8b162fa1e22f44"
            },
            "downloads": -1,
            "filename": "traits-6.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "43a96b3f6effb8312a41365106d67e50",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9527655,
            "upload_time": "2023-10-09T13:39:13",
            "upload_time_iso_8601": "2023-10-09T13:39:13.177687Z",
            "url": "https://files.pythonhosted.org/packages/b1/08/ab5a95c4e3f7ebff53c4b58cdeee5ad161a8a285e02620928ff566185a48/traits-6.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-09 13:39:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "enthought",
    "github_project": "traits",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "traits"
}
        
Elapsed time: 0.11806s