{ "info": { "author": "Robert Ledger", "author_email": "figlief@figlief.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===\nctx\n===\n\nctx - A minimal but opinionated dict/object combo (like Bunch).\n\n.. image:: https://travis-ci.org/figlief/ctx.png?branch=master\n :target: https://travis-ci.org/figlief/ctx\n\n.. contents::\n :backlinks: none\n\nRequirements\n------------\nThe ctx module should work with all versions of Python.\n\nFeatures\n--------\n\nThe ctx module provides the `Ctx` class which is a subclass of\nthe python 'dict' object.\n\n Ctx modifies 'dict' in the following ways:\n\n 1 The dictionary items can be read or set using attribute\n access notation.\n\n 'ctx.a' is identical to 'ctx[\"a\"]' and\n 'ctx.a = 5' is identical to 'ctx[\"a\"] = 5'\n\n 2 The objects attributes can be read using item access notation.\n\n 'ctx[\"__doc__\"]' is identical to 'ctx.__doc__'\n\n 3 The objects attributes can not be set under any circumstances.\n\n 4 The dictionary can not have a key with the same name as an\n objects attribute.\n\n\n 'ctx.name' and 'ctx[\"name\"]' are resolved using the following three steps.\n\n a) if the object has an attribute 'name' then return the attribute.\n\n b) if the dictionary has a key 'name' then return the value\n associated with the key.\n\n c) raise LookupError.\n\n\n 'ctx.name = 5' and 'ctx[\"name\"] = 5'\n\n a) If name is an attribute of the class then raise AttributeError.\n\n b) set the dictionary item as usual.\n\n\nInstallation\n------------\nYou can install this package using pip with the following command. ::\n\n pip install ctx\n\n\nSupport\n-------\nTo report any bugs, or ask any question, please visit ::\n\n https://github.com/figlief/ctx/issues.\n\n\nResources\n---------\nHere is a list of useful links about this project.\n\n- `Latest release on PyPI `_\n- `Source code on GitHub `_\n- `Issue tracker on GitHub `_\n- `Changelog on GitHub\n `", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/figlief/ctx", "keywords": "ctx", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ctx", "package_url": "https://pypi.org/project/ctx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ctx/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/figlief/ctx" }, "release_url": "https://pypi.org/project/ctx/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "A minimal but opinionated dict/object combo (like Bunch).", "version": "0.1.2" }, "last_serial": 1353977, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "cd41a6bdcbe256e08a546108a410b6da", "sha256": "beb1628d6624b19c04a065fab6751feace594fd4072b3e649cafdd765182e441" }, "downloads": -1, "filename": "ctx-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cd41a6bdcbe256e08a546108a410b6da", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4649, "upload_time": "2014-12-19T07:31:07", "url": "https://files.pythonhosted.org/packages/11/87/f6ab88cd29495120e255a092397095fb9a6ed0918a01fe104ca3389341df/ctx-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f78d30e463b574486fdc50abaea9cc41", "sha256": "edbff45647936da3cdadcfeaa64ee9f62b8ad629a5cea8caa4b63f5dc08b99c4" }, "downloads": -1, "filename": "ctx-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f78d30e463b574486fdc50abaea9cc41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3579, "upload_time": "2014-12-19T07:31:04", "url": "https://files.pythonhosted.org/packages/48/aa/94bc2fdfe7a524cde4275c115bcc0185e6a58fde460568c513242b314b73/ctx-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cd41a6bdcbe256e08a546108a410b6da", "sha256": "beb1628d6624b19c04a065fab6751feace594fd4072b3e649cafdd765182e441" }, "downloads": -1, "filename": "ctx-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cd41a6bdcbe256e08a546108a410b6da", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4649, "upload_time": "2014-12-19T07:31:07", "url": "https://files.pythonhosted.org/packages/11/87/f6ab88cd29495120e255a092397095fb9a6ed0918a01fe104ca3389341df/ctx-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f78d30e463b574486fdc50abaea9cc41", "sha256": "edbff45647936da3cdadcfeaa64ee9f62b8ad629a5cea8caa4b63f5dc08b99c4" }, "downloads": -1, "filename": "ctx-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f78d30e463b574486fdc50abaea9cc41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3579, "upload_time": "2014-12-19T07:31:04", "url": "https://files.pythonhosted.org/packages/48/aa/94bc2fdfe7a524cde4275c115bcc0185e6a58fde460568c513242b314b73/ctx-0.1.2.tar.gz" } ] }