{ "info": { "author": "Gabriel", "author_email": "gabrielmenezesvi@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "pystalkd\r\n========\r\n\r\n Beanstalk is a simple, fast work queue. Its interface is generic,\r\n but was originally designed for reducing the latency of page views\r\n in high-volume web applications by running time-consuming tasks\r\n asynchronously\r\n\r\nhttp://kr.github.io/beanstalkd/\r\n\r\npystalkd is a beanstalkd bindings targeting python3. This library is\r\nbased on https://github.com/earl/beanstalkc and should be API\r\ncompatible.\r\n\r\n|Build Status| Installing -------\r\n\r\n::\r\n\r\n pip install pystalkd\r\n\r\nor from source:\r\n\r\n::\r\n\r\n python setup.py install\r\n\r\nUsing\r\n-----\r\n\r\n.. code:: python\r\n\r\n >>> from pystalkd.Beanstalkd import Connection\r\n >>> c = Connection(\"localhost\", 11300) #if no argument is given default configuration is used\r\n >>> c.put(\"hey!\")\r\n >>> job = c.reserve(0)\r\n >>> job.body\r\n \"hey!\"\r\n\r\nOne of the goals is to be API compatible with beanstalkc, so this\r\ntutorial should be valid:\r\nhttps://github.com/earl/beanstalkc/blob/master/TUTORIAL.mkd\r\n\r\nThe main differences, API wise are:\r\n\r\n1) where number of seconds is expected pystalkd also accepts a timedelta\r\n object\r\n\r\n2) you can temporarily watch and use a tube using the ``with`` keyword\r\n\r\n.. code:: python\r\n\r\n print(c.using()) # \"default\"\r\n with c.temporary_use(\"test\"):\r\n print(c.using()) # \"test\"\r\n print(c.using()) # \"default\"\r\n\r\n print(c.watching()) # [\"default\"]\r\n with c.temporary_use(\"test\"):\r\n print(c.watching()) # [\"default\", \"test\"]\r\n print(c.watching()) # [\"default\"]\r\n\r\n3) you also have access to the \"bytes\" API. To maintain compatibility\r\n with beanstalkc the API worked only with strings but now you can use\r\n the functions ending in \"\\_bytes\" (internally this is controlled\r\n using the ``raw`` paramater) to work directly with bytes\r\n\r\n.. code:: python\r\n\r\n from os import urandom\r\n test_bytes = urandom(50)\r\n job_id = c.put_bytes(test_bytes)\r\n job = c.reserve_bytes(0)\r\n print(job.body) # b'i\\x91\\xdf\\xf8\\x1b?zj....'\r\n\r\n job_id2 = c.put(\"string\")\r\n job2 = c.reserve_bytes(0)\r\n print(job2.body) # b'string'\r\n\r\nNote: you can use ``reserve_bytes`` with ``put`` and get the raw string\r\n(not encoded), but the other way around might cause problems\r\n\r\nTests\r\n-----\r\n\r\nTo test with default host and port (localhost, 11300):\r\n\r\n::\r\n\r\n python3 test.py\r\n\r\nTo test on a specific host (if port is not specified 11300 is used)\r\n\r\n::\r\n\r\n python3 test.py host [port]\r\n\r\nLicense\r\n-------\r\n\r\nCopyright (C) 2008-2014 Andreas Bolka.\r\n\r\nCopyright (C) 2015-2016 Gabriel Menezes. Licensed under the `Apache\r\nLicense,Version 2.0 `__.\r\n\r\n.. |Build Status| image:: https://travis-ci.org/menezes-/pystalkd.svg?branch=master\r\n :target: https://travis-ci.org/menezes-/pystalkd", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/menezes-/pystalkd/archive/v1.2.3.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/menezes-/pystalkd", "keywords": "beanstalkd,python3,bindings", "license": "Apache-2.0", "maintainer": null, "maintainer_email": null, "name": "pystalkd", "package_url": "https://pypi.org/project/pystalkd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pystalkd/", "project_urls": { "Download": "https://github.com/menezes-/pystalkd/archive/v1.2.3.zip", "Homepage": "https://github.com/menezes-/pystalkd" }, "release_url": "https://pypi.org/project/pystalkd/1.2.3/", "requires_dist": null, "requires_python": null, "summary": "Beanstalkd bindings for python3", "version": "1.2.3" }, "last_serial": 2111151, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "a6f029ae0a67912c8a7bfedaaa352653", "sha256": "71c56775349afa290ea260aedda64188140cb1c926935b31b82dd6a86f883edd" }, "downloads": -1, "filename": "pystalkd-1.0.1.zip", "has_sig": false, "md5_digest": "a6f029ae0a67912c8a7bfedaaa352653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7683, "upload_time": "2014-12-06T20:55:57", "url": "https://files.pythonhosted.org/packages/ab/fe/b6621ccb8cb8c5f7b0fa65d0c0a0828f99b15278b47bdbf3ffe892ca5f5e/pystalkd-1.0.1.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "4a3d44bb3d462f9ce26747b4064f3798", "sha256": "1fdc639978530ed203da6a7ee23c3631be07b55d2359e717700d02cbc8b64e09" }, "downloads": -1, "filename": "pystalkd-1.1.zip", "has_sig": false, "md5_digest": "4a3d44bb3d462f9ce26747b4064f3798", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8788, "upload_time": "2014-12-08T12:30:27", "url": "https://files.pythonhosted.org/packages/12/31/71dfba5d2e1981b227af8bc7431349fa71089e802fea5cd148a55bfea27b/pystalkd-1.1.zip" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "6a859b84a86e362bab2e733684eb16f1", "sha256": "10fe4ada79946018b55c6678d996b2dfb80b5e1158f6772bc8c344b7043bd086" }, "downloads": -1, "filename": "pystalkd-1.1.1.zip", "has_sig": false, "md5_digest": "6a859b84a86e362bab2e733684eb16f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8646, "upload_time": "2015-01-23T20:49:44", "url": "https://files.pythonhosted.org/packages/90/66/63765edb161bad88b24b2657b7b6ce8f25890cf7703d749c4296a1c3de35/pystalkd-1.1.1.zip" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "b7a2f0b505624de39cacaf6f52c1d076", "sha256": "19bc37e6678059494ccdd746a1d230845caea8857936ac4078b0867f329753a0" }, "downloads": -1, "filename": "pystalkd-1.2.0.zip", "has_sig": false, "md5_digest": "b7a2f0b505624de39cacaf6f52c1d076", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9366, "upload_time": "2015-10-28T19:30:28", "url": "https://files.pythonhosted.org/packages/f8/85/57f8baa72620c9a525082f17c7f3e48590d8d7661c754910b458bde59a75/pystalkd-1.2.0.zip" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "0ef79d4de497fa1252515762992bead5", "sha256": "b6cc0894ef16f838e95775b00c1f7e620bae4d290e69199fd9489277e9ad7423" }, "downloads": -1, "filename": "pystalkd-1.2.1.zip", "has_sig": false, "md5_digest": "0ef79d4de497fa1252515762992bead5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9399, "upload_time": "2015-10-29T12:24:56", "url": "https://files.pythonhosted.org/packages/bc/b1/fe412e01457df9104cb524514618bc36f6789c62338d3d20c822c5f308b4/pystalkd-1.2.1.zip" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "8e303a5bd1903cb5c09214dea7518986", "sha256": "66fbf979a259a7faac45667b177ce5c1364f0b249c7414399fa231c80ad35409" }, "downloads": -1, "filename": "pystalkd-1.2.2.zip", "has_sig": false, "md5_digest": "8e303a5bd1903cb5c09214dea7518986", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16176, "upload_time": "2016-05-11T15:06:21", "url": "https://files.pythonhosted.org/packages/9e/75/8ced3f6f169582742d10a95aa718c5b492ebe836a57ccfbb736d8d155e67/pystalkd-1.2.2.zip" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "3316750a4d9ce92c817ac9a5dce705f5", "sha256": "4fe631e31df6995d74ccd226020c5e67e3690f49a8efc66f17b432f21d0fe796" }, "downloads": -1, "filename": "pystalkd-1.2.3.zip", "has_sig": false, "md5_digest": "3316750a4d9ce92c817ac9a5dce705f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16217, "upload_time": "2016-05-11T18:31:18", "url": "https://files.pythonhosted.org/packages/d8/f5/c15f8ecfd543af1e81b6c3413902219fbc9c9437fb3a2e931ac64281d533/pystalkd-1.2.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3316750a4d9ce92c817ac9a5dce705f5", "sha256": "4fe631e31df6995d74ccd226020c5e67e3690f49a8efc66f17b432f21d0fe796" }, "downloads": -1, "filename": "pystalkd-1.2.3.zip", "has_sig": false, "md5_digest": "3316750a4d9ce92c817ac9a5dce705f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16217, "upload_time": "2016-05-11T18:31:18", "url": "https://files.pythonhosted.org/packages/d8/f5/c15f8ecfd543af1e81b6c3413902219fbc9c9437fb3a2e931ac64281d533/pystalkd-1.2.3.zip" } ] }