{ "info": { "author": "ted kaemming, disqus", "author_email": "ted@disqus.com", "bugtrack_url": null, "classifiers": [], "description": "menagerie\n=========\n\n *menagerie* - (n.) a place where animals are kept and trained especially for exhibition\n\nA ZooKeeper-backed Django settings holder.\n\nBasic Usage\n-----------\n\nThe ``menagerie.configure`` helper function provides a method to bootstrap your\nDjango settings using the settings already available by normal methods (via the\n``DJANGO_SETTINGS_MODULE`` environment variable), but uses the settings present\nin ZooKeeper to override these defaults.\n\nTo configure your application,\n\n* Add a ``ZOOKEEPER_HOSTS`` setting to your Django settings file(s) that\n includes the network addresses of the ZooKeeper ensemble members to connect\n to as a list or tuple. For example:\n\n .. code:: python\n\n ZOOKEEPER_HOSTS = ('zookeeper-1.local', 'zookeeper-2.local')\n\n To bind the ZooKeeper client to a namespace other than the root namespace,\n add a ``ZOOKEEPER_SETTINGS_NAMESPACE`` setting containing the namespace.\n\n* Add the following to the entry point(s) to your application (e.g.\n ``manage.py``) before accessing any attributes of ``django.conf.settings``:\n\n .. code:: python\n\n import menagerie\n menagerie.configure()\n\n It may be helpful to configure your logging to output ``DEBUG``-level\n messages for the ``menagerie`` namespace to track down any errors you may\n encounter when configuring your application.\n\nStorage\n-------\n\nThe settings storage is designed to be as simple as possible, and only uses the\nnodes within a single tree to represent all settings.\n\nTrees are not traversed recursively -- all settings must be stored as the\ndirect children of a shared root node, which defaults to ``/`` or the root of\nyour ZooKeeper cluster/client namespace.\n\nFor example, the following tree of node names and values in ZooKeeper::\n\n /DEBUG: true\n /INTERNAL_IPS: ['127.0.0.1', '192.168.0.1']\n\n...would yield the following settings::\n\n settings.DEBUG == True\n settings.INTERNAL_IPS == ['127.0.0.1', '192.168.0.1']\n\nThe deserializer doesn't do any sort of merging of complex types such as\nmappings or sequences -- either the values read from the ZooKeeper node data\nwill be returned, or the default value if no value exists in the ZooKeeper\ntree.\n\nSetting names that are valid as ZooKeeper node names but have language-specific\nsemantics in Python (for example, names containing the ``.`` or ``-``\ncharacters) may still be used, but will need to be accessed using ``getattr``\non the settings holder, like so:\n\n.. code:: python\n\n getattr(settings, 'MY-SPECIAL-SETTING')\n\nRunning Tests\n-------------\n\nThe test suite can be run with ``make test``.\n\nThe suite requires a working ZooKeeper installation, the path to which can be\nspecified with the ``ZOOKEEPER_PATH`` environment variable. If you don't\nalready have an installation of ZooKeeper, running ``make zookeeper`` will\ncreate one where the default path is located.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/disqus/menagerie", "keywords": null, "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "menagerie", "package_url": "https://pypi.org/project/menagerie/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/menagerie/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/disqus/menagerie" }, "release_url": "https://pypi.org/project/menagerie/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "0.1.0" }, "last_serial": 2243433, "releases": { "0.0.0": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "e2efbf260fb8db195e817d3b05a53111", "sha256": "e61787abe4b843c8e4c079fe54dc9c59f45cd16a10e8c5b562ee08b598b84aac" }, "downloads": -1, "filename": "menagerie-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e2efbf260fb8db195e817d3b05a53111", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3901, "upload_time": "2012-12-06T19:52:06", "url": "https://files.pythonhosted.org/packages/ce/6f/4cfd2680091ad5023f87ca583ba30490f85c4aea9d7b60aa00179575d784/menagerie-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e2efbf260fb8db195e817d3b05a53111", "sha256": "e61787abe4b843c8e4c079fe54dc9c59f45cd16a10e8c5b562ee08b598b84aac" }, "downloads": -1, "filename": "menagerie-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e2efbf260fb8db195e817d3b05a53111", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3901, "upload_time": "2012-12-06T19:52:06", "url": "https://files.pythonhosted.org/packages/ce/6f/4cfd2680091ad5023f87ca583ba30490f85c4aea9d7b60aa00179575d784/menagerie-0.1.0.tar.gz" } ] }