{
"info": {
"author": "Christopher Pezley",
"author_email": "pypi@pezley.net",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
],
"description": "[](https://travis-ci.org/lejar/traitlite)\n\n# traitlite\n\nTraitlite is a light-weight (MIT-licensed) package which provides certain [descriptors](https://docs.python.org/3/howto/descriptor.html) to help control the attributes in a class, such as making them read-only\\* or providing type-checking whenever the value is set. \n\nHere's a quick example that shows what it does, but the documentation has examples for every trait, so check it out!\n```python\nfrom traitlite import ReadOnly, TypeChecked\nclass Foo:\n bar = TypeChecked(int) + ReadOnly()\n\n def __init__(self, bar):\n self.bar = bar\n\nFoo(3.0) # Raises exception\nfoo = Foo(3) # Okay\nfoo.b = 2 # Raises exception because of read-only\n```\n\n\\* well, as read-only as you can get in python\n\n## Installation\n\nThe easiest way to install traitlite is through pip:\n\n```bash\npip install traitlite\n```\n\n## Running the tests\n\nTraitlite uses the builtin python unit testing framework, along with [hypothesis](https://hypothesis.works/). Additionally, [cosmic-ray](https://github.com/sixty-north/cosmic-ray) is used for mutation testing.\n\nTo install the dependencies required to run the tests, run:\n```bash\npip install -r unittest_requirements.txt\n```\nThis will install both hypothesis and cosmic-ray.\n\nTo run the tests, simply execute the following from the package directory:\n\n```bash\npython setup.py test\n```\n\nTo run mutation testing, execute:\n```bash\npython setup.py crtest\n```\n\nIf you want to get the [coverage](https://github.com/nedbat/coveragepy) of the tests, execute:\n\n```bash\npython setup.py coverage\n```\n\n## Documentation\n\nThe docs can be found [here](https://traitlite.readthedocs.io/en/latest/). Alternatively, if you want to build them yourself simply run\n\n```bash\nmake \n```\nin the docs folder of the project. To see a list of all the different targets, simply run make without any arguments.\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/lejar/traitlite",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "traitlite",
"package_url": "https://pypi.org/project/traitlite/",
"platform": "",
"project_url": "https://pypi.org/project/traitlite/",
"project_urls": {
"Homepage": "https://github.com/lejar/traitlite"
},
"release_url": "https://pypi.org/project/traitlite/0.0.3/",
"requires_dist": null,
"requires_python": "",
"summary": "A light-weight module that aims to provide control for class attributes.",
"version": "0.0.3"
},
"last_serial": 4548457,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "09aab4fff7e2a92de7a6c0ed00fdb7ce",
"sha256": "17e937a2100c0e5e6dc1f927bebdd050860069b8d95656fd6f37f4225571e1b6"
},
"downloads": -1,
"filename": "traitlite-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "09aab4fff7e2a92de7a6c0ed00fdb7ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4727,
"upload_time": "2018-07-28T12:35:19",
"url": "https://files.pythonhosted.org/packages/1d/e8/4e0ee6826c6b089d5c88e3f6c44dee59dd23a4f462b91acb11a509b62f3a/traitlite-0.0.1.tar.gz"
}
],
"0.0.2": [
{
"comment_text": "",
"digests": {
"md5": "6cbcdaa87a7fbc0e7e0e0edee4162e6d",
"sha256": "fe0a5690582645b179fe9b295068fec308eae10799bf88fd55e3764d2c102519"
},
"downloads": -1,
"filename": "traitlite-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "6cbcdaa87a7fbc0e7e0e0edee4162e6d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6604,
"upload_time": "2018-09-16T15:25:49",
"url": "https://files.pythonhosted.org/packages/77/ff/8fbab8081532b12dd2df2003e5bd8a31d12fb2d2cabf411861a8cab39331/traitlite-0.0.2.tar.gz"
}
],
"0.0.3": [
{
"comment_text": "",
"digests": {
"md5": "f0594464128a95345af740fc0e39c5e5",
"sha256": "bfcd35e2c757fd71b5a54b22f0c55a1908f3ae3266920ff656820e1f7ff9f267"
},
"downloads": -1,
"filename": "traitlite-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "f0594464128a95345af740fc0e39c5e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8017,
"upload_time": "2018-11-30T19:57:17",
"url": "https://files.pythonhosted.org/packages/f3/eb/7e58b3716ed1788e0ef94c9398c29342eac43a9fe655d2a43acf73120b93/traitlite-0.0.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "f0594464128a95345af740fc0e39c5e5",
"sha256": "bfcd35e2c757fd71b5a54b22f0c55a1908f3ae3266920ff656820e1f7ff9f267"
},
"downloads": -1,
"filename": "traitlite-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "f0594464128a95345af740fc0e39c5e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8017,
"upload_time": "2018-11-30T19:57:17",
"url": "https://files.pythonhosted.org/packages/f3/eb/7e58b3716ed1788e0ef94c9398c29342eac43a9fe655d2a43acf73120b93/traitlite-0.0.3.tar.gz"
}
]
}