{ "info": { "author": "Daniel Lindsley", "author_email": "daniel@toastdriven.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: No Input/Output (Daemon)", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "Alligator\n=========\n\n.. image:: https://travis-ci.org/toastdriven/alligator.png?branch=master\n :target: https://travis-ci.org/toastdriven/alligator\n\nSimple offline task queues. For Python.\n\n\"See you later, alligator.\"\n\nLatest documentation at http://alligator.readthedocs.org/en/latest/.\n\n\nRequirements\n------------\n\n* Python 2.6+ or Python 3.3+\n* (Optional) ``redis`` for the Redis backend\n* (Optional) ``beanstalkc`` for the Beanstalk backend\n* (Optional) ``PyYAML`` for the Beanstalk backend\n* (Optional) ``boto>=2.35.0`` for the SQS backend\n\n\nWHY?!!1!\n--------\n\n* Because I have NIH-syndrome.\n* Or because I longed for something simple (~375 loc).\n* Or because I wanted something with tests (90%+ coverage) & docs.\n* Or because I wanted pluggable backends.\n* Or because testing some other queuing system was a pain.\n* Or because I'm an idiot.\n\n\nBasic Usage\n-----------\n\nThis example uses Django, but there's nothing Django-specific about Alligator.\n\nI repeat, You can use it with **any** Python code that would benefit from\nbackground processing.\n\n.. code:: python\n\n from alligator import Gator\n\n from django.contrib.auth.models import User\n from django.shortcuts import send_email\n\n\n # Make a Gator instance.\n # Under most circumstances, you would configure this in one place &\n # import that instance instead.\n gator = Gator('redis://localhost:6379/0')\n\n\n # The task itself.\n # Nothing special, just a plain *undecorated* function.\n def follow_email(followee_username, follower_username):\n followee = User.objects.get(username=followee_username)\n follower = User.objects.get(username=follower_username)\n\n subject = 'You got followed!'\n message = 'Hey {}, you just got followed by {}! Whoohoo!'.format(\n followee.username,\n follower.username\n )\n send_email(subject, message, 'server@example.com', [followee.email])\n\n\n # An simple, previously expensive view.\n @login_required\n def follow(request, username):\n # You'd import the task function above.\n if request.method == 'POST':\n # Schedule the task.\n # Use args & kwargs as normal.\n gator.task(follow_email, request.user.username, username)\n return redirect('...')\n\n\nRunning Tasks\n-------------\n\nRather than trying to do autodiscovery, fanout, etc., you control how your\nworkers are configured & what they consume.\n\nIf your needs are simple, run the included ``latergator.py`` worker:\n\n.. code:: bash\n\n $ python latergator.py redis://localhost:6379/0\n\nIf you have more complex needs, you can create a new executable file\n(bin script, management command, whatever) & drop in the following code.\n\n.. code:: python\n\n from alligator import Gator, Worker\n\n # Bonus points if you import that one pre-configured ``Gator`` instead.\n gator = Gator('redis://localhost:6379/0')\n\n # Consume & handle all tasks.\n worker = Worker(gator)\n worker.run_forever()\n\n\nLicense\n-------\n\nNew BSD\n\n\nFuture Wishlist\n---------------\n\nThese things aren't present yet, but maybe someday they will be.\n\n.. code:: python\n\n # Delayed tasks (run in an hour).\n with gator.options(run_after=60 * 60) as task:\n task(this_can_wait)\n\n # Dependent tasks, will only run if the listed tasks succeed.\n # Maybe.\n with gator.options(depends_on=[feeds_job]) as task:\n task(rebuild_cache)\n\n\nRunning Tests\n-------------\n\nAlligator has 95%+ test coverage & aims to be passing/stable at all times.\n\nIf you'd like to run the tests, clone the repo, then run::\n\n $ virtualenv env2\n $ . env2/bin/activate\n $ pip install -r requirements.txt\n $ python setup.py develop\n $ py.test -s -v --cov=alligator --cov-report=html tests\n\n\nTODO\n----\n\n* Scheduled tasks\n* Dependent tasks", "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/toastdriven/alligator/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "alligator", "package_url": "https://pypi.org/project/alligator/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/alligator/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/toastdriven/alligator/" }, "release_url": "https://pypi.org/project/alligator/0.10.0/", "requires_dist": null, "requires_python": null, "summary": "Simple offline task queues.", "version": "0.10.0" }, "last_serial": 1486022, "releases": { "0.1.0-dev": [], "0.10.0": [ { "comment_text": "", "digests": { "md5": "95db62ea90614579b3093a9d3ebde7f2", "sha256": "fbf1f356c3d3fb2c523f8325efb6515ef3db3ac9039f44b8d49dd90742aff598" }, "downloads": -1, "filename": "alligator-0.10.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "95db62ea90614579b3093a9d3ebde7f2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18363, "upload_time": "2015-04-01T04:56:17", "url": "https://files.pythonhosted.org/packages/2e/1c/35e07d625b14cc5fd9b612b80373d31ec6baca916bc6f81f904af5b8666f/alligator-0.10.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "716fd05871a1f1edf945abc6927550e6", "sha256": "49b8da869a24f62ff6c28e1dfc92d789dd1e866f60714b0d0582ce980933d8c6" }, "downloads": -1, "filename": "alligator-0.10.0.tar.gz", "has_sig": false, "md5_digest": "716fd05871a1f1edf945abc6927550e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330927, "upload_time": "2015-04-01T04:56:07", "url": "https://files.pythonhosted.org/packages/dd/18/82ec2de50dfaebde3c8d50046f7b574bc8dd31d63a578b6b30cc3b1c13c9/alligator-0.10.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "bc71a73d0704edd55b591cb5c6408d62", "sha256": "6edf7b6ee5eb90aed038af5a262bcae7aac057417be07ca9e79652bc2a09f481" }, "downloads": -1, "filename": "alligator-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bc71a73d0704edd55b591cb5c6408d62", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13619, "upload_time": "2015-01-01T08:58:20", "url": "https://files.pythonhosted.org/packages/60/7c/5512e82e4d2f1e49f134dbea6c7fce3aee649d60c2274ccb15d4b1619592/alligator-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5fb7bf94f9893aa0335555584af8eb9f", "sha256": "cfacf4c8d069e25f568ee54e1763d093f3cdaf763e7024f376ebee4b3e6137c3" }, "downloads": -1, "filename": "alligator-0.5.0.tar.gz", "has_sig": false, "md5_digest": "5fb7bf94f9893aa0335555584af8eb9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 217121, "upload_time": "2015-01-01T08:58:09", "url": "https://files.pythonhosted.org/packages/23/74/0b6986cecc4c3df21b6d83bf5b437a7954366824df81e3f9cc8db1bbfaf6/alligator-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "2a3e3ee314c8f0780ac6ca1165d7d8d8", "sha256": "47aaca57159f8f640cbde2e490da679f64b25abc711a350147ba74e8f7cf4a57" }, "downloads": -1, "filename": "alligator-0.5.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2a3e3ee314c8f0780ac6ca1165d7d8d8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15621, "upload_time": "2015-01-01T09:01:55", "url": "https://files.pythonhosted.org/packages/72/f5/2668e211dfc930a0e3bae2155c75d9958dbab6e5c5112d648215014d98d9/alligator-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4440c5b90da3f3748c929b0d1fc3fb2e", "sha256": "11eb521e2852b4840f712fb13b0ac7ae6245001954c75703e2b16e601d042624" }, "downloads": -1, "filename": "alligator-0.5.1.tar.gz", "has_sig": false, "md5_digest": "4440c5b90da3f3748c929b0d1fc3fb2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 218151, "upload_time": "2015-01-01T09:01:46", "url": "https://files.pythonhosted.org/packages/29/7e/8c08cd4926d6b616d813d5d8f08ac58329e95d803c416ff2cf75b3d3e842/alligator-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "779d5720167199cc899ae11fd0a75d12", "sha256": "48abc8f7d18273793d80105cb1c432d148d225be3e82d3c0824288b2dae74d36" }, "downloads": -1, "filename": "alligator-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "779d5720167199cc899ae11fd0a75d12", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15763, "upload_time": "2015-01-01T09:29:37", "url": "https://files.pythonhosted.org/packages/a7/74/88b785cac4129343b7c3dc57ca070a3621a6143070fa40726238605a9590/alligator-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3a64db1694cfc39ddc5d52fdfe4de87", "sha256": "07f04f224d449a1a9601cb5b006b7a42876f8b6458fefb84c76605111d1d034c" }, "downloads": -1, "filename": "alligator-0.6.0.tar.gz", "has_sig": false, "md5_digest": "c3a64db1694cfc39ddc5d52fdfe4de87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 218290, "upload_time": "2015-01-01T09:29:15", "url": "https://files.pythonhosted.org/packages/64/3a/e0395b476cee037c3ab0c40fe26cbe74c7379ffc5f6b6d8fb8ae5fc3b1ab/alligator-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "0c1ac1269138c1a5d2d523a6b657514a", "sha256": "2a02e445e87b532143482f80ef499aaabb6668493368caf35c546e85f0ee757d" }, "downloads": -1, "filename": "alligator-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0c1ac1269138c1a5d2d523a6b657514a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16984, "upload_time": "2015-01-01T20:34:37", "url": "https://files.pythonhosted.org/packages/5c/f3/6e93f7f904319978ccf9a96c97bba7a6d7df272c8c62899ea07896ebbae5/alligator-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdb8b754b3c8ddde3af7d7ad930e73f0", "sha256": "22e6970157a9288495ab55ae0ecc2df1a806fbbb19a3beb7c4c0b80a4ac3aadc" }, "downloads": -1, "filename": "alligator-0.7.0.tar.gz", "has_sig": false, "md5_digest": "fdb8b754b3c8ddde3af7d7ad930e73f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 219225, "upload_time": "2015-01-01T20:34:31", "url": "https://files.pythonhosted.org/packages/17/37/952bff2e6d80232fc2c6aec6e19c07595a8b7fb0aa87468fdda8a1f092d3/alligator-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "615b2aa90cdba37b3d3d8b8dad6cff04", "sha256": "01d11888189fe23aa691976e2c8d61c52d642b2f1935edfbf2830807c52d52d0" }, "downloads": -1, "filename": "alligator-0.7.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "615b2aa90cdba37b3d3d8b8dad6cff04", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 17081, "upload_time": "2015-01-02T07:14:13", "url": "https://files.pythonhosted.org/packages/da/a9/886d28a561e0d77f780ec0eb26feb78b495f08363ce481dcce5af084c93a/alligator-0.7.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d38205e7cc0fd954294c8de22a82827", "sha256": "8eff89a86ad86a8e723ab0dd7ad8171468fe5bbb0c1cdc4866258ca7dc895e01" }, "downloads": -1, "filename": "alligator-0.7.1.tar.gz", "has_sig": false, "md5_digest": "6d38205e7cc0fd954294c8de22a82827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 324251, "upload_time": "2015-01-02T07:14:24", "url": "https://files.pythonhosted.org/packages/e2/17/0814b2a2250aebb8bdb6dfaa877ff912e4c467d75ae0b05c320e6847f617/alligator-0.7.1.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "a696068d344857641f06d807ba8bf2d7", "sha256": "dc03250b77833fa4749b2b2fe608bcb2e9b63331dc74a9d33874aad3465a8259" }, "downloads": -1, "filename": "alligator-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a696068d344857641f06d807ba8bf2d7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 17263, "upload_time": "2015-01-03T03:41:03", "url": "https://files.pythonhosted.org/packages/ef/6f/b5465b4952e88eab4764c801d8972917d88c3f6c2de76c495756430603d4/alligator-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0563dcb69c32a85ce75d9cc7bb0fa9f", "sha256": "235bbc3ae5cd209c9457985ce52f945fe75e404321f54ab6b35925525ff2ce35" }, "downloads": -1, "filename": "alligator-0.8.0.tar.gz", "has_sig": false, "md5_digest": "a0563dcb69c32a85ce75d9cc7bb0fa9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 329170, "upload_time": "2015-01-03T03:40:52", "url": "https://files.pythonhosted.org/packages/9b/94/c958dec159b3b082e6fae24624e3ebf226f94399f7b54c15893dfa18c375/alligator-0.8.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "d10ac413806788bf36a7dcffa5335281", "sha256": "ccc47d9250a89f84b6aaa6d02d3209f88d5761c127b6b46a3242e25fb7f6c8fd" }, "downloads": -1, "filename": "alligator-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d10ac413806788bf36a7dcffa5335281", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18289, "upload_time": "2015-01-12T05:16:50", "url": "https://files.pythonhosted.org/packages/c1/7a/e203cba46306c94c43726d90e1a7fcd2ae20d15f59e6c2a3c6a4841a0fa2/alligator-0.9.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e845e137bb27cfdef072dd0b786fe2c6", "sha256": "ab3129c184a7cb7ce0d59e7945e7a4f29de721e8b1737a1d1edccd57be74d24c" }, "downloads": -1, "filename": "alligator-0.9.0.tar.gz", "has_sig": false, "md5_digest": "e845e137bb27cfdef072dd0b786fe2c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330813, "upload_time": "2015-01-12T05:16:40", "url": "https://files.pythonhosted.org/packages/e4/b7/37a66a44d747e97e2959ce67f0e94ec3db47eac6d337b65d6e79faa94e32/alligator-0.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95db62ea90614579b3093a9d3ebde7f2", "sha256": "fbf1f356c3d3fb2c523f8325efb6515ef3db3ac9039f44b8d49dd90742aff598" }, "downloads": -1, "filename": "alligator-0.10.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "95db62ea90614579b3093a9d3ebde7f2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18363, "upload_time": "2015-04-01T04:56:17", "url": "https://files.pythonhosted.org/packages/2e/1c/35e07d625b14cc5fd9b612b80373d31ec6baca916bc6f81f904af5b8666f/alligator-0.10.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "716fd05871a1f1edf945abc6927550e6", "sha256": "49b8da869a24f62ff6c28e1dfc92d789dd1e866f60714b0d0582ce980933d8c6" }, "downloads": -1, "filename": "alligator-0.10.0.tar.gz", "has_sig": false, "md5_digest": "716fd05871a1f1edf945abc6927550e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330927, "upload_time": "2015-04-01T04:56:07", "url": "https://files.pythonhosted.org/packages/dd/18/82ec2de50dfaebde3c8d50046f7b574bc8dd31d63a578b6b30cc3b1c13c9/alligator-0.10.0.tar.gz" } ] }