{ "info": { "author": "Mike Burr", "author_email": "mburr@unintuitive.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Topic :: Software Development", "Topic :: Utilities" ], "description": "direg Overview\n**************\n\ndireg lets you maintain arbitrary registry data (in the form of python dictionaries that can be \"merged\" in a logical\nway (think: global config -vs- user config). With a small amount of work, it is possible to replace hardcoded\nvalues with easily-maintainable and flexible registry entries.\n\nSuppose we have a file at ``/my/path/registry.py`` with the following contents.\n\n.. code-block:: python\n\n data = {\n 'one.Foo.meth.somevar': 26804,\n 'one.Foo.somevar': 24742,\n 'one.myfunc.somevar': 16834,\n 'one.outer.inner.somevar': 7678,\n }\n\n\nThen, in some module ``one``, we can do the following:\n\n``one.py``\n\n.. code-block:: python\n\n from direg import get_value, registries\n # Load the registry with the above data. Note that this could take place in another module and could include an\n # arbitrary number of registry files.\n registries.append('/my/path/registry.py')\n\n class Foo:\n somevar = get_value('somevar') # will be 24742\n def meth(self):\n return get_value('somevar')\n\n f = Foo()\n f.meth() # will return 26804\n f.somevar # 24742\n Foo.somevar # also 24742\n\n def myfunc():\n somevar = get_value('somevar')\n return somevar\n\n myfunc() # will be 16834", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/stnbu/direg/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stnbu/direg", "keywords": "configuration,registry,refactor", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "direg", "package_url": "https://pypi.org/project/direg/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/direg/", "project_urls": { "Download": "https://github.com/stnbu/direg/archive/master.zip", "Homepage": "https://github.com/stnbu/direg" }, "release_url": "https://pypi.org/project/direg/0.2.6/", "requires_dist": null, "requires_python": null, "summary": "A drop-in registry. Easily maintain a central configuration registry for your complex python project.", "version": "0.2.6" }, "last_serial": 1323635, "releases": { "0.2.5": [ { "comment_text": "", "digests": { "md5": "a872942de8cd2efbba695da9982db35b", "sha256": "925c15b32136ac7dc588e06a886c4ac059d36ea2dc8c2528182966d0ab56ee9f" }, "downloads": -1, "filename": "direg-0.2.5.zip", "has_sig": true, "md5_digest": "a872942de8cd2efbba695da9982db35b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7550, "upload_time": "2014-11-27T18:39:59", "url": "https://files.pythonhosted.org/packages/79/4d/fbba8a8141457f254d422b8d6d82f5b46c33dc3eff450ab709db09ed04d5/direg-0.2.5.zip" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "db9f7f27a74266fc1af176ae58d271d3", "sha256": "0271ecc30b9eef6bb340b6433749c85865bca289c2f56701926aaece226a81ce" }, "downloads": -1, "filename": "direg-0.2.6.zip", "has_sig": true, "md5_digest": "db9f7f27a74266fc1af176ae58d271d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7619, "upload_time": "2014-11-27T21:25:23", "url": "https://files.pythonhosted.org/packages/82/f3/d987e74faa4742e341a8f495abd5d257557ef0b93f2daf9125e809840cd7/direg-0.2.6.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db9f7f27a74266fc1af176ae58d271d3", "sha256": "0271ecc30b9eef6bb340b6433749c85865bca289c2f56701926aaece226a81ce" }, "downloads": -1, "filename": "direg-0.2.6.zip", "has_sig": true, "md5_digest": "db9f7f27a74266fc1af176ae58d271d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7619, "upload_time": "2014-11-27T21:25:23", "url": "https://files.pythonhosted.org/packages/82/f3/d987e74faa4742e341a8f495abd5d257557ef0b93f2daf9125e809840cd7/direg-0.2.6.zip" } ] }