{ "info": { "author": "Njal Karevoll", "author_email": "njal@karevoll.no", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "# djkeeper: Utilities for using ZooKeeper in a Django project\n\n\n## Installing\n\nEither install the latest relase from PYPI:\n\n $ pip install djkeeper\n\n... or get the latest development version from GitHub:\n\n $ pip install https://github.com/nkvoll/djkeeper/zipball/master#egg=djkeeper\n\nAdditionally, djkeeper requires a working installation of the official low level Python ZooKeeper bindings. These can either be built from source (recommended, explanation below), or\nyou could install the statically compiled version [zc-zookeeper-static](http://pypi.python.org/pypi/zc-zookeeper-static)) from PYPI, which may or may not work on your architecture/OS, and may\nor may not be the latest available ZooKeeper version.\n\n\n### Installing ZooKeeper on OS X (homebrew)\n\nIf you don't have homebrew, follow the Linux installation below, skipping \"ldconfig\", otherwise, use homebrew to install zookeeper with the ``--python`` flag:\n\n $ brew install --python zookeeper\n\n\n### Installing ZooKeeper on Linux\n\nDownload and unpack the latest release of ZooKeeper from http://zookeeper.apache.org/releases.html:\n\n $ tar -zxvf zookeeper-3.4.2.tar.gz\n\nBuild the C bindings:\n\n $ cd zookeeper-3.4.2/src/c\n $ ./configure --prefix=/usr/local\n $ make\n $ sudo make install\n $ ldconfig\n\nBuild and install the python bindings:\n\n $ cd ../contrib/zkpython\n $ ant install\n\n\n## Running the test-suite\n\nThe test suite assumes you have a ZooKeeper server running on localhost:22181:\n\n $ cd example\n $ export ZOOCFGDIR=$(pwd) zkServer start-foreground\n\nzkServer / zkServer.sh is found in the ZooKeeper installation directory.\n\nThe tests can then be run via the setup.py script:\n\n $ python setup.py test\n\n\n## Example usage with Django\n\nSee https://github.com/nkvoll/pykeeper/blob/master/Readme.md for more detailed usage of the client object instance.\n\n### Configuring:\n\nZooKeeper clients are configured in your ``settings.py`` file under the configuration key ``DJKEEPER``:\n\n DJKEEPER = dict(\n clients = dict(\n client_name = dict(\n servers = 'localhost:22181', # defaults to localhost:2181\n reconnect = True # defaults to True, which means the client should reconnect if the connection is lost\n )\n )\n )\n\nMultiple named clients can be configured this way.\n\n### Using in a view:\n\nFor example, in ``views.py``:\n\n from django.http import HttpResponse\n from djkeeper import manager\n\n\n def index(request):\n client = manager.ZooKeeperManager.get_or_create_client('client_name')\n root_children = client.get_children('/')\n return HttpResponse('Root children: {0}'.format(root_children))\n\n\n``manager.ZooKeeperManager`` accepts the following keyword parameters:\n\n * ``auto_connect``: Whether to call .connect() on a newly created client before returning it. Defaults to true.\n * ``wait_until_connected``: Whether to block until the client state becomes ``connected`` before returning the client. Defaults to true.\n * ``wait_until_connected_timeout``: How long the call is allowed to block (in seconds) before a ``pykeeper.TimeoutException`` is raised. Defaults to ``None``, which means no timeout.\n\n\n### Admin-overview\n\nFirst, add ``djkeeper`` to your list of ``INSTALLED_APPS`` in settings.py, then\nadd the following route to your urls.py:\n\n #...\n url(r'^admin/djkeeper/', 'djkeeper.views.index'),\n #...\n\nOr, if you use [django-adminplus](https://github.com/jsocol/django-adminplus), an overview over the clients is automatically\nadded to the admin panel when you call ``admin.autodiscover()``. In this case, the custom route should NOT be added to your urls.py.\n\n\n## License\n\nMIT licensed, see LICENSE for details.", "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/nkvoll/djkeeper", "keywords": "zookeeper,pykeeper", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "djkeeper", "package_url": "https://pypi.org/project/djkeeper/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/djkeeper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/nkvoll/djkeeper" }, "release_url": "https://pypi.org/project/djkeeper/0.2.4/", "requires_dist": null, "requires_python": null, "summary": "Utilities for using ZooKeeper from a Django project.", "version": "0.2.4" }, "last_serial": 791198, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "69b659eb60c3175bff97ddbb63257536", "sha256": "294e611e0e3e141d81a58777572c28a9c6d35d712a6fe27418401943b982bab1" }, "downloads": -1, "filename": "djkeeper-0.2.1.tar.gz", "has_sig": false, "md5_digest": "69b659eb60c3175bff97ddbb63257536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5425, "upload_time": "2012-02-12T21:27:55", "url": "https://files.pythonhosted.org/packages/c6/72/552432d6bf0ad8307b714ef1bed2e80f68cd5a4fbe72412d0f892083cd84/djkeeper-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ad324d73af568a244b6c7f85ee42ea26", "sha256": "6d1d3f4aebd135f6f8f0c8844bb7e1c4abe5bf02261a1cfcd36d82908896c695" }, "downloads": -1, "filename": "djkeeper-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ad324d73af568a244b6c7f85ee42ea26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5658, "upload_time": "2012-02-12T21:46:49", "url": "https://files.pythonhosted.org/packages/b2/a0/d950062cbb973be0af6d18f7bb02e25a31fc6edd9805e4887077b33e88f6/djkeeper-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "2fabbfaf4f72a0c00387fb4b1791d411", "sha256": "f18dc5a686e7c96d81ab9d08e554e94ee82416dbb079387bd8be14a2cbdb2b29" }, "downloads": -1, "filename": "djkeeper-0.2.3.tar.gz", "has_sig": false, "md5_digest": "2fabbfaf4f72a0c00387fb4b1791d411", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5675, "upload_time": "2012-02-13T13:14:08", "url": "https://files.pythonhosted.org/packages/d2/18/b1e15a5e6bf9b9879c44ead6843bc45db2f7625d216891d98706f99947b1/djkeeper-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "9b467e73410e271409591ed0134f7b06", "sha256": "7d454f69f25a7e3d5a1a0b8142acf5d9c7fa18c1ac7c55016b390b742b9da7e7" }, "downloads": -1, "filename": "djkeeper-0.2.4.tar.gz", "has_sig": false, "md5_digest": "9b467e73410e271409591ed0134f7b06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5689, "upload_time": "2012-02-13T13:51:17", "url": "https://files.pythonhosted.org/packages/66/8c/5f738f63d3dddfb2acf68c30cf68422f3a6415336f448f7328fed3385ca8/djkeeper-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9b467e73410e271409591ed0134f7b06", "sha256": "7d454f69f25a7e3d5a1a0b8142acf5d9c7fa18c1ac7c55016b390b742b9da7e7" }, "downloads": -1, "filename": "djkeeper-0.2.4.tar.gz", "has_sig": false, "md5_digest": "9b467e73410e271409591ed0134f7b06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5689, "upload_time": "2012-02-13T13:51:17", "url": "https://files.pythonhosted.org/packages/66/8c/5f738f63d3dddfb2acf68c30cf68422f3a6415336f448f7328fed3385ca8/djkeeper-0.2.4.tar.gz" } ] }