{ "info": { "author": "ybrs", "author_email": "aybars.badur@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "pydisque\n=========\n\nClient for Disque, an in-memory, distributed job queue.\n\n[![Build Status](https://travis-ci.org/ybrs/pydisque.png)](https://travis-ci.org/ybrs/pydisque)\n\nDocumentation\n-------------\n\n[Read The Docs](http://pydisque.readthedocs.org/en/latest/)\n\nUsage\n-----\n\nCreate a new Disque client by passing a list of nodes:\n\n```python\nfrom pydisque.client import Client\nclient = Client([\"127.0.0.1:7711\", \"127.0.0.1:7712\", \"127.0.0.1:7713\"])\nclient.connect()\n```\n\nIf it can't connect to first node, it will try to connect to second, etc.., if it can't connect to any node, it will raise a redis.exceptions.ConnectionError as you can imagine.\n\nNow you can add jobs:\n\n```python\nclient.add_job(\"test_queue\", json.dumps([\"print\", \"hello\", \"world\", time.time()]), timeout=100)\n```\n\nIt will push the job \"print\" to the queue \"test_queue\" with a timeout of 100\nms, and return the id of the job if it was received and replicated\nin time. If it can't reach the node - maybe it was shutdown etc. - it will retry to connect to another node in given node list, and then send the job. If there is no avail nodes in your node list, it will obviously raise a ConnectionError\n\nThen, your workers will do something like this:\n\n```python\nwhile True:\n jobs = client.get_job(['test_queue'])\n for queue_name, job_id, job in jobs:\n job = json.loads(job)\n print \">>> received job:\", job\n client.ack_job(job_id)\n```\n\nalso check examples directory.\n\nWhile waiting jobs your connected node may go down, pydisque will try to connect to next node, so you can restart your nodes without taking down your clients.\n\nDocumentation\n------------\nFor now please check docstrings in disque/client.py, implemented commands are\n\n- info\n- add_job\n- get_job\n- ack_job\n- nack_job\n- fast_ack\n- working\n- qlen\n- qstat\n- qpeek\n- qscan\n- jscan\n- enqueue\n- dequeue\n- del_job\n- show\n- pause\n- hello\n\nInstallation\n------------\n\nYou can install it using pip.\n\n```\n$ pip install pydisque\n```\n\nLicense\n-----------\nThis project is licensed under the terms of the MIT license\n\nCredits\n-----------\n- [ybrs](https://github.com/ybrs)\n- [lovelle](https://github.com/lovelle)\n- [canardleteer](https://github.com/canardleteer)\n- [shuge](https://github.com/shuge)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ybrs/pydisque", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pydisque", "package_url": "https://pypi.org/project/pydisque/", "platform": "", "project_url": "https://pypi.org/project/pydisque/", "project_urls": { "Homepage": "http://github.com/ybrs/pydisque" }, "release_url": "https://pypi.org/project/pydisque/0.1.5/", "requires_dist": [ "redis", "six" ], "requires_python": "", "summary": "disque client", "version": "0.1.5" }, "last_serial": 4878887, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3d4768a3b6e40919939f25c465d0c9ff", "sha256": "3e89a68ec62971d7c3ca3c89b6608d26fe52b68d9c8087de8fa2c080773e1ecb" }, "downloads": -1, "filename": "pydisque-0.1.tar.gz", "has_sig": false, "md5_digest": "3d4768a3b6e40919939f25c465d0c9ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3368, "upload_time": "2015-04-28T00:07:24", "url": "https://files.pythonhosted.org/packages/f7/f0/a4810b1bc6be02669058003fc80a22b84bef12643a030871efb8dfbc2820/pydisque-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "55b2a38e4b7d565b41de94e8d62f33b8", "sha256": "1b2d4d6f774dd551c9641ec15fdd03db125b58b2541d693c3577679a5700b714" }, "downloads": -1, "filename": "pydisque-0.1.1.tar.gz", "has_sig": false, "md5_digest": "55b2a38e4b7d565b41de94e8d62f33b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3637, "upload_time": "2015-05-01T14:36:15", "url": "https://files.pythonhosted.org/packages/e1/6c/e1d017791d2175c854e5704e6562f668a419c07b8b46bf2d95fc04ef3dab/pydisque-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b6a7b02e81e69ae7f19476a1a27cdbf8", "sha256": "01a2828370a4f5b47763f019f2e6698ad27e2a99705c78138484c311b71b7347" }, "downloads": -1, "filename": "pydisque-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b6a7b02e81e69ae7f19476a1a27cdbf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5858, "upload_time": "2016-01-28T11:56:32", "url": "https://files.pythonhosted.org/packages/4a/16/f1988b2aadc29a8171bd0eb29f1e125517dab35d6c1cde21b45d22ed3d83/pydisque-0.1.2.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "09634ac923ff42612f0cbf5aa68f7b09", "sha256": "0585179710a57051e90bf18f6ac55adba90920510835733bc02ff06a431865a9" }, "downloads": -1, "filename": "pydisque-0.1.4.macosx-10.13-x86_64.tar.gz", "has_sig": false, "md5_digest": "09634ac923ff42612f0cbf5aa68f7b09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11227, "upload_time": "2019-02-28T11:45:31", "url": "https://files.pythonhosted.org/packages/92/13/cfe2d8e4ead82502969d4b50e2635d2a96bde83bd38d8a45b39a41e5e95c/pydisque-0.1.4.macosx-10.13-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "55f4822e65dafbb42c2728701b275769", "sha256": "8c20189fffeaa64b04fd5fbe07d2c8aaf27d68136910bc96bf56eb96cdc1cdbb" }, "downloads": -1, "filename": "pydisque-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "55f4822e65dafbb42c2728701b275769", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8261, "upload_time": "2019-02-28T11:45:29", "url": "https://files.pythonhosted.org/packages/3c/a7/b152dc61ac81bff330b48b31f4e29dab5aa79f0f65d2be8ed85d993ed7e2/pydisque-0.1.4-py3-none-any.whl" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1c78ca6016cffd3f53d9fca82f2fa697", "sha256": "9d7a9ea8c4d335fb8d217d002683b46b6450b6b4a0c421c39a699090b4f7dbc8" }, "downloads": -1, "filename": "pydisque-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "1c78ca6016cffd3f53d9fca82f2fa697", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8263, "upload_time": "2019-02-28T11:47:35", "url": "https://files.pythonhosted.org/packages/48/d6/a520a561d7e340a2746e5f20bc7311fecedce941579aea066955f6c14faf/pydisque-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a8522a5cda061bee71bb83149e95e97", "sha256": "35517b43afe5d675586956de0f919ad3b82b1be6047319009906bcaafd4b60f9" }, "downloads": -1, "filename": "pydisque-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5a8522a5cda061bee71bb83149e95e97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7140, "upload_time": "2019-02-28T11:47:36", "url": "https://files.pythonhosted.org/packages/d0/be/e9334062fef8ee4d41c0730aab811139bfb94ea83d2774879fa4b9d40774/pydisque-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c78ca6016cffd3f53d9fca82f2fa697", "sha256": "9d7a9ea8c4d335fb8d217d002683b46b6450b6b4a0c421c39a699090b4f7dbc8" }, "downloads": -1, "filename": "pydisque-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "1c78ca6016cffd3f53d9fca82f2fa697", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8263, "upload_time": "2019-02-28T11:47:35", "url": "https://files.pythonhosted.org/packages/48/d6/a520a561d7e340a2746e5f20bc7311fecedce941579aea066955f6c14faf/pydisque-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a8522a5cda061bee71bb83149e95e97", "sha256": "35517b43afe5d675586956de0f919ad3b82b1be6047319009906bcaafd4b60f9" }, "downloads": -1, "filename": "pydisque-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5a8522a5cda061bee71bb83149e95e97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7140, "upload_time": "2019-02-28T11:47:36", "url": "https://files.pythonhosted.org/packages/d0/be/e9334062fef8ee4d41c0730aab811139bfb94ea83d2774879fa4b9d40774/pydisque-0.1.5.tar.gz" } ] }