{ "info": { "author": "Surya Ambrose", "author_email": "sambrose@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "**strong_typing** is a Python package containing some classes to create strongly\ntyped structures in Python\n\n``strong_typing`` in a few words\n--------------------------------\n\nIn Python, all variables are weakly typed, which means that a variable can take\nall values of any type. The Python interpreter will then infer at runtime which\noperations this variable can undergo depending on what it contains. This is\ncalled \"type inference\".\n\nThis can be a problem in different situations\n\n - A function that does not receive the expected type as input\n - A variable or a class attribute whose type is changed through assignment\n\nTo avoid functions being called with bad arguments, you can use Python's\n`typing module `_) (however only\nwith Python3). To check if a variable is not incorrectly used, you can install\nand run `mypy module `_).\n\nBut if the latest is great for static check (without running the code), it does\nnot work on the code you don't own.\n\nIf, for instance you design a class expecting a certain type of attributes,\n``mypy`` can very easily detect if you don't mistakenly override these\nattributes with wrong typed data.\n\nBut if you put this class in a Python package and that someone else uses it,\nthere is no way to be sure they will respect your attribute's type.\n\nTo make sure they do, you would need to define a descriptor's class for each\nattribute and define a setter function protecting your value against abusive\nset. That's what we did :)\n\nIn the end, your class could look like this:\n\n::\n\n class MyTypedStruct(Struct):\n __ATTRIBUTES__ = [IntegerParameter(name=\"my_int\"),\n FloatParameter(name=\"my_float\")]\n __DESCRIPTION__ = \"A sample of class with typed attributes\"\n\nWant to know more ?\n-------------------\n\nFind the complete documentation `here `_.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aldebaran/strong_typing.git", "keywords": "static-typing strongly-typed structures", "license": "BSD-3", "maintainer": "", "maintainer_email": "", "name": "strong-typing", "package_url": "https://pypi.org/project/strong-typing/", "platform": "", "project_url": "https://pypi.org/project/strong-typing/", "project_urls": { "Homepage": "https://github.com/aldebaran/strong_typing.git" }, "release_url": "https://pypi.org/project/strong-typing/0.3.1/", "requires_dist": [ "enum34 (>=1.0.4)", "Qt.py (>=1.0.0)" ], "requires_python": "", "summary": "Classes to create strongly typed structures in Python", "version": "0.3.1" }, "last_serial": 3220607, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "94294b9b7876eff6ce2ef792626f65c1", "sha256": "6fd780b364874f202fbf489dfc32822889f15ae1bfd7cfe48d4ebb0af14b7399" }, "downloads": -1, "filename": "strong_typing-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "94294b9b7876eff6ce2ef792626f65c1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 25852, "upload_time": "2017-10-02T22:25:03", "url": "https://files.pythonhosted.org/packages/29/c7/1e7720986dcfd7cf85dda57aa31794f751eac9432b920b37b4c29023ecb1/strong_typing-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8dcf942f5cc7da884c635e5cdd33cd78", "sha256": "915b9b360b7af26aba8dc12514d208f8694b6e9c8d484f6f78bbcc2d305994f2" }, "downloads": -1, "filename": "strong_typing-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8dcf942f5cc7da884c635e5cdd33cd78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12055, "upload_time": "2017-10-02T22:25:04", "url": "https://files.pythonhosted.org/packages/6b/fa/3abe65eead53d0ccb84474a3014d1421daf8ccf20d22c2c15ec7c8d061c8/strong_typing-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "96b536b570c1b4bf95fdac76425df93c", "sha256": "aa5a21800d481d3d0750e494f690de8b34c9629eb65fa7fdb3f70e33dc33be11" }, "downloads": -1, "filename": "strong_typing-0.3.1-py2-none-any.whl", "has_sig": false, "md5_digest": "96b536b570c1b4bf95fdac76425df93c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 25831, "upload_time": "2017-10-02T22:29:56", "url": "https://files.pythonhosted.org/packages/69/f8/4c0bc386b24622a80cf027de1a403c6fc5d9db463e3246e3058e0926fdc1/strong_typing-0.3.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29b0f3ad8f6e820636a58b14e0158e56", "sha256": "ad1dec2f4a2fd6f7aa315e5369d8b7c7fc07ae046b5c12a2e01e3b5d038657dd" }, "downloads": -1, "filename": "strong_typing-0.3.1.tar.gz", "has_sig": false, "md5_digest": "29b0f3ad8f6e820636a58b14e0158e56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12047, "upload_time": "2017-10-02T22:29:58", "url": "https://files.pythonhosted.org/packages/29/62/69c1911679e18c47bcb45eb36b09b718aa53749057998b06c2352211f4bc/strong_typing-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "96b536b570c1b4bf95fdac76425df93c", "sha256": "aa5a21800d481d3d0750e494f690de8b34c9629eb65fa7fdb3f70e33dc33be11" }, "downloads": -1, "filename": "strong_typing-0.3.1-py2-none-any.whl", "has_sig": false, "md5_digest": "96b536b570c1b4bf95fdac76425df93c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 25831, "upload_time": "2017-10-02T22:29:56", "url": "https://files.pythonhosted.org/packages/69/f8/4c0bc386b24622a80cf027de1a403c6fc5d9db463e3246e3058e0926fdc1/strong_typing-0.3.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29b0f3ad8f6e820636a58b14e0158e56", "sha256": "ad1dec2f4a2fd6f7aa315e5369d8b7c7fc07ae046b5c12a2e01e3b5d038657dd" }, "downloads": -1, "filename": "strong_typing-0.3.1.tar.gz", "has_sig": false, "md5_digest": "29b0f3ad8f6e820636a58b14e0158e56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12047, "upload_time": "2017-10-02T22:29:58", "url": "https://files.pythonhosted.org/packages/29/62/69c1911679e18c47bcb45eb36b09b718aa53749057998b06c2352211f4bc/strong_typing-0.3.1.tar.gz" } ] }