{ "info": { "author": "Matt Pewsey", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# Propy\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/propy.svg)\n![PyPI](https://img.shields.io/pypi/v/propy.svg)\n[![Build Status](https://travis-ci.com/mpewsey/propy.svg?branch=master)](https://travis-ci.com/mpewsey/propy)\n[![Documentation Status](https://readthedocs.org/projects/propy/badge/?version=latest)](https://propy.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/mpewsey/propy/branch/master/graph/badge.svg)](https://codecov.io/gh/mpewsey/propy)\n\n## About\n\nThis package contains convenience functions for creating class properties\nwith type conversion and validation characteristics in Python. While Python's\nlack of typecasting is certainly one of the features that make it an easy to\nlearn and code language, there are certainly times when you might want\nto implement controls on the types of values a class property can assume.\nThis package provides a few functions to hopefully handle those situations\na little easier.\n\nTo provide an example, let's assume you have a property that you want to restrict\nto boolean values. To do this normally, you would need to setup a property\nmanually by creating custom setter, getter, and deleter functions. With this\npackage, however, you can use the provided `bool_property` function instead\nas follows:\n\n```python\nimport propy\n\nclass Example():\n bool_prop = propy.bool_property('bool_prop')\n```\n\nThe `bool_property` function creates the setter, getter, and deleter that you\nwould have needed to manually define. The `'bool_prop'` name supplied to the\nfunction is used to create a \"private\" `_bool_prop` attribute behind the scenes,\nthen the \"public\" `bool_prop` attribute simply calls the defined setter, getter,\nand deleter to perform the respective action on that private attribute.\nIt's not a huge gain, but it reduces to a single line of code what may\nhave taken about 10 lines.\n\n## Installation\nThis package may be installed via pip:\n\n```\npip install propy\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mpewsey/propy", "keywords": "properties,utility", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "propy", "package_url": "https://pypi.org/project/propy/", "platform": "", "project_url": "https://pypi.org/project/propy/", "project_urls": { "Homepage": "https://github.com/mpewsey/propy" }, "release_url": "https://pypi.org/project/propy/1.0.0/", "requires_dist": [ "docutils (==0.14); extra == 'docs'", "numpydoc (>=0.8.0); extra == 'docs'", "pytest (>=3.5.1); extra == 'test'", "pytest-cov (>=2.5.1); extra == 'test'", "codecov (>=2.0.15); extra == 'test'", "numpy (>=1.14.5); extra == 'test'" ], "requires_python": ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4", "summary": "Library of class property creation functions for type conversion and validation.", "version": "1.0.0" }, "last_serial": 4827274, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e9b3c6b85a2f89a8a3656243013e2e8a", "sha256": "a15f8c55705c2d40e75a2c65903f44a68b90328b2222f4289c66fe3e67d3e42b" }, "downloads": -1, "filename": "propy-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e9b3c6b85a2f89a8a3656243013e2e8a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4", "size": 7717, "upload_time": "2019-02-15T22:49:04", "url": "https://files.pythonhosted.org/packages/8f/4f/51031fabc8783c57f863048f5ab1dcea21826478497d7c49896da6f1723c/propy-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45368a40a1df83c1bb6eae7242bc3e44", "sha256": "f4397ac9c4e3f357033b54654e6ef1916c196f18b438f49d77278b9199b67c13" }, "downloads": -1, "filename": "propy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "45368a40a1df83c1bb6eae7242bc3e44", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4", "size": 6340, "upload_time": "2019-02-15T22:49:06", "url": "https://files.pythonhosted.org/packages/49/ce/bd9108cdb154884a9eab6c59b4ecc1146f2f6a57df39cd7a66f413892075/propy-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9b3c6b85a2f89a8a3656243013e2e8a", "sha256": "a15f8c55705c2d40e75a2c65903f44a68b90328b2222f4289c66fe3e67d3e42b" }, "downloads": -1, "filename": "propy-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e9b3c6b85a2f89a8a3656243013e2e8a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4", "size": 7717, "upload_time": "2019-02-15T22:49:04", "url": "https://files.pythonhosted.org/packages/8f/4f/51031fabc8783c57f863048f5ab1dcea21826478497d7c49896da6f1723c/propy-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45368a40a1df83c1bb6eae7242bc3e44", "sha256": "f4397ac9c4e3f357033b54654e6ef1916c196f18b438f49d77278b9199b67c13" }, "downloads": -1, "filename": "propy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "45368a40a1df83c1bb6eae7242bc3e44", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4", "size": 6340, "upload_time": "2019-02-15T22:49:06", "url": "https://files.pythonhosted.org/packages/49/ce/bd9108cdb154884a9eab6c59b4ecc1146f2f6a57df39cd7a66f413892075/propy-1.0.0.tar.gz" } ] }