{ "info": { "author": "Cameron Simpson", "author_email": "cs@cskk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Convenience facilities related to Python functions.\n* funccite: cite a function (name and code location)\n* @prop: replacement for @property which turns internal AttributeErrors into RuntimeErrors\n* some decorators to verify the return types of functions\n\n## Function `callmethod_if(o, method, default=None, a=None, kw=None)`\n\nCall the named `method` on the object `o` if it exists.\n\nIf it does not exist, return `default` (which defaults to None).\nOtherwise call getattr(o, method)(*a, **kw).\n`a` defaults to ().\n`kw` defaults to {}.\n\n## Function `derived_from(property_name)`\n\nA property which must be recomputed\nif the revision of another property exceeds the snapshot revision.\n\n## Function `derived_property(func, original_revision_name='_revision', lock_name='_lock', property_name=None, unset_object=None)`\n\nA property which must be recomputed\nif the reference revision (attached to self)\nexceeds the snapshot revision.\n\n## Function `funccite(func)`\n\nReturn a citation for a function (name and code location).\n\n## Function `funcname(func)`\n\nReturn a name for the supplied function `func`.\nSeveral objects do not have a __name__ attribute, such as partials.\n\n## Function `prop(func)`\n\nA substitute for the builtin @property.\n\nThe builtin @property decorator lets internal AttributeErrors escape.\nWhile that can support properties that appear to exist conditionally,\nin practice this is almost never what I want, and it masks deeper errors.\nHence this wrapper for @property that transmutes internal AttributeErrors\ninto RuntimeErrors.\n\n## Function `returns_bool(func)`\n\nDecorator for functions which should return Booleans.\n\n## Function `returns_str(func)`\n\nDecorator for functions which should return strings.\n\n## Function `returns_type(func, basetype)`\n\nDecrator which checks that a function returns values of type `basetype`.\n\n## Function `yields_str(func)`\n\nDecorator for generators which should yield strings.\n\n## Function `yields_type(func, basetype)`\n\nDecorator which checks that a generator yields values of type `basetype`.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cameron_simpson/css/commits/all", "keywords": "python2,python3", "license": "GNU General Public License v3 or later (GPLv3+)", "maintainer": "", "maintainer_email": "", "name": "cs.py.func", "package_url": "https://pypi.org/project/cs.py.func/", "platform": "", "project_url": "https://pypi.org/project/cs.py.func/", "project_urls": { "Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all" }, "release_url": "https://pypi.org/project/cs.py.func/20190729/", "requires_dist": null, "requires_python": "", "summary": "Convenience facilities related to Python functions. * funccite: cite a function (name and code location) * @prop: replacement for @property which turns internal AttributeErrors into RuntimeErrors * some decorators to verify the return types of functions", "version": "20190729" }, "last_serial": 5597096, "releases": { "20150115": [ { "comment_text": "", "digests": { "md5": "2e1670ed9264b92bd467543ac284e932", "sha256": "bebe6a8770cf263cd7f63025b3441d4d1d4d01c6cdca76bab4db91975a1056c6" }, "downloads": -1, "filename": "cs.py.func-20150115.tar.gz", "has_sig": false, "md5_digest": "2e1670ed9264b92bd467543ac284e932", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2794, "upload_time": "2015-01-18T05:52:47", "url": "https://files.pythonhosted.org/packages/92/9a/448fdfd20c69cb426a798579eb5dcfbb11b33cc90ae3c066225995ce321c/cs.py.func-20150115.tar.gz" } ], "20160828": [ { "comment_text": "", "digests": { "md5": "3219950b866422f8c432ded2b28b2fe0", "sha256": "d89f300f05a0c18d4ece7e6c2b191ca6aa87f7b877f150c4df5270e0fd8e290c" }, "downloads": -1, "filename": "cs.py.func-20160828.tar.gz", "has_sig": false, "md5_digest": "3219950b866422f8c432ded2b28b2fe0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3146, "upload_time": "2016-08-28T06:09:12", "url": "https://files.pythonhosted.org/packages/0e/81/ad2730eb8a4d56a0c3a534d8d39b13faeeb944a125224da75b8f1902d2d3/cs.py.func-20160828.tar.gz" } ], "20170906.1": [ { "comment_text": "", "digests": { "md5": "1ff8636f47356d28eb6e1858caea6191", "sha256": "dd71263d8602f48e6e3e86a63e847de043bfcd51aaa995d27ee370827c5a9827" }, "downloads": -1, "filename": "cs.py.func-20170906.1.tar.gz", "has_sig": false, "md5_digest": "1ff8636f47356d28eb6e1858caea6191", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3089, "upload_time": "2017-09-06T00:01:53", "url": "https://files.pythonhosted.org/packages/7b/fb/57aed0839a56c7ccf3a8f014ed0b3c364fedb2d3832ae1c52d32fde80670/cs.py.func-20170906.1.tar.gz" } ], "20181231": [ { "comment_text": "", "digests": { "md5": "5d4a1b7b9eaebfc3092ceaaa1ab41fb2", "sha256": "ff38cad7ec62e5c583b7b33e8cf793b529efc78665a1d7bd88f0505956ce454f" }, "downloads": -1, "filename": "cs.py.func-20181231.tar.gz", "has_sig": false, "md5_digest": "5d4a1b7b9eaebfc3092ceaaa1ab41fb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3608, "upload_time": "2018-12-31T10:44:46", "url": "https://files.pythonhosted.org/packages/f5/a0/33e11c1bd2e8b7a4b510a06e844cb3549e589317689772002e558cc43c30/cs.py.func-20181231.tar.gz" } ], "20190108": [ { "comment_text": "", "digests": { "md5": "11af9085380d6c27ef335b9b2dbd6c2f", "sha256": "48541a5f40345c76c07cae55b59b78f976065e4b65ef8cc11aa806abbc013191" }, "downloads": -1, "filename": "cs.py.func-20190108.tar.gz", "has_sig": false, "md5_digest": "11af9085380d6c27ef335b9b2dbd6c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3500, "upload_time": "2019-01-08T02:12:20", "url": "https://files.pythonhosted.org/packages/2a/ce/02191dd04b282267360c77c6cca52e2af8dbba03fad5ef711fb406dee485/cs.py.func-20190108.tar.gz" } ], "20190729": [ { "comment_text": "", "digests": { "md5": "f144f4d0b258453c67142ae8ecfde746", "sha256": "37f9cb2c755e2cff53815f9e97d3950ab76e9e0fb8ab29a55a33855398ecdddf" }, "downloads": -1, "filename": "cs.py.func-20190729.tar.gz", "has_sig": false, "md5_digest": "f144f4d0b258453c67142ae8ecfde746", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3730, "upload_time": "2019-07-29T00:00:02", "url": "https://files.pythonhosted.org/packages/a8/38/44f03fa93d432a7c174d28f18bf0f0bb2069cee0bccde046ee821524630b/cs.py.func-20190729.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f144f4d0b258453c67142ae8ecfde746", "sha256": "37f9cb2c755e2cff53815f9e97d3950ab76e9e0fb8ab29a55a33855398ecdddf" }, "downloads": -1, "filename": "cs.py.func-20190729.tar.gz", "has_sig": false, "md5_digest": "f144f4d0b258453c67142ae8ecfde746", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3730, "upload_time": "2019-07-29T00:00:02", "url": "https://files.pythonhosted.org/packages/a8/38/44f03fa93d432a7c174d28f18bf0f0bb2069cee0bccde046ee821524630b/cs.py.func-20190729.tar.gz" } ] }