{ "info": { "author": "Brendan Maguire", "author_email": "maguire.brendan@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "===============================\nKamikaze\n===============================\n\n.. image:: https://badge.fury.io/py/kamikaze.png\n :target: http://badge.fury.io/py/kamikaze\n\n.. image:: https://travis-ci.org/brendanmaguire/kamikaze.png?branch=master\n :target: https://travis-ci.org/brendanmaguire/kamikaze\n\nA service for placing prioritised packages with expiry times on a queue and\nhaving a consumer notified of the packages\n\nHow it works\n------------\n\nThis service monitors a Redis sorted set and calls a consumer function\nwhen a new package arrives or the current highest priority package\nexpires. The consumer function can be a regular Python function or an\n`asyncio coroutine `__.\n\nHow to install\n--------------\n\n::\n\n pip install kamikaze\n\nThe consumer function\n---------------------\n\nThe consumer function is the function that is called when a new message\ncomes to the top of the queue. The function should be of the format:\n\n::\n\n def consumer_function(package, *args):\n \"\"\"\n Does stuff with packages and optional args passed from the command line\n \"\"\"\n\nLong running consumer functions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf the consumer function is long running then it should yield control of\nthe loop when possible. Otherwise the kamikaze service will be slow to\nreact to changes in the queue.\n\nFast running consumer function\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf the consumer function is fast then there will be no need to yield\ncontrol to the main loop until it is complete.\n\nRunning the service\n-------------------\n\nStart the service by running the following:\n\n::\n\n kamikaze service --consumer-function-args\n\nThe consumer function should be the full path to the python coroutine.\nIt must be in your ``$PYTHONPATH``.\n\nGive the ``--help`` flag for a full list of options.\n\nTools\n-----\n\nPushing a Package\n~~~~~~~~~~~~~~~~~\n\nUse the ``push`` command to add a package to the queue:\n\n::\n\n kamikaze push \n\nRemoving a Package\n~~~~~~~~~~~~~~~~~~\n\nUse the ``remove`` command to remove a package from the queue:\n\n::\n\n kamikaze remove \n\nList Packages on Queue\n~~~~~~~~~~~~~~~~~~~~~~\n\nUse the ``list`` command to list all packages on the queue:\n\n::\n\n kamikaze list\n\nRunning the examples\n--------------------\n\nYielding example\n~~~~~~~~~~~~~~~~\n\nAn example of a yielding function can be run like so:\n\n::\n\n kamikaze service example_consumer.consumer.yielding_consumer_func\n\nBlocking example\n~~~~~~~~~~~~~~~~\n\nAn example of a blocking function can be run like so:\n\n::\n\n kamikaze service example_consumer.consumer.blocking_consumer_func", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brendanmaguire/kamikaze", "keywords": "kamikaze", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "kamikaze", "package_url": "https://pypi.org/project/kamikaze/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/kamikaze/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/brendanmaguire/kamikaze" }, "release_url": "https://pypi.org/project/kamikaze/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A service for placing prioritised packages with expiry times on a queue and having a consumer notified of the packages", "version": "0.1.1" }, "last_serial": 1314997, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b3f0811d935070f8a889bf5c08fde1e5", "sha256": "406eaa459591e4f8b9b9cfc9446e02f929f9fb1b3643da416571d5994437ff54" }, "downloads": -1, "filename": "kamikaze-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b3f0811d935070f8a889bf5c08fde1e5", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8855, "upload_time": "2014-11-19T20:46:52", "url": "https://files.pythonhosted.org/packages/31/dc/edc2588626b3a5161e0b7d6fadb2880db552263fb8ca32cb0b285ad60c3a/kamikaze-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aea5f1af5eefd343bd4031aae04b4092", "sha256": "3134fe9d9be9bc814f14625823781c187724208b762551f5ca7f7f03664972f1" }, "downloads": -1, "filename": "kamikaze-0.1.0.tar.gz", "has_sig": false, "md5_digest": "aea5f1af5eefd343bd4031aae04b4092", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8983, "upload_time": "2014-11-19T20:46:49", "url": "https://files.pythonhosted.org/packages/98/f7/0f069af28dc6e4395978f94abf2c71d0a0a5f2511f40a57ba05bfe9e0f71/kamikaze-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5e6921bcc355f7830e052d205d27e6ae", "sha256": "f2c7b73a13cab1fd12c7753bb770c6a3fa0d1c6ebd461000811571ef177bdecc" }, "downloads": -1, "filename": "kamikaze-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5e6921bcc355f7830e052d205d27e6ae", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8837, "upload_time": "2014-11-20T20:02:08", "url": "https://files.pythonhosted.org/packages/8c/1c/91073a49b70f9a50d891572de962a825b54fa7adbee8b103c7ea85229c2d/kamikaze-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4df725386c17ab431ec8a4b45dc5932", "sha256": "b8d4be4dfb48fcde14a3fe275bfa6324a7e729c76991cf028ef91943ce3e00a2" }, "downloads": -1, "filename": "kamikaze-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d4df725386c17ab431ec8a4b45dc5932", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8952, "upload_time": "2014-11-20T19:21:42", "url": "https://files.pythonhosted.org/packages/33/1c/39afb4a7bd73d6d04192a6d6ab892cacec4c09dc2355cd1b6da1700ec910/kamikaze-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5e6921bcc355f7830e052d205d27e6ae", "sha256": "f2c7b73a13cab1fd12c7753bb770c6a3fa0d1c6ebd461000811571ef177bdecc" }, "downloads": -1, "filename": "kamikaze-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5e6921bcc355f7830e052d205d27e6ae", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8837, "upload_time": "2014-11-20T20:02:08", "url": "https://files.pythonhosted.org/packages/8c/1c/91073a49b70f9a50d891572de962a825b54fa7adbee8b103c7ea85229c2d/kamikaze-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4df725386c17ab431ec8a4b45dc5932", "sha256": "b8d4be4dfb48fcde14a3fe275bfa6324a7e729c76991cf028ef91943ce3e00a2" }, "downloads": -1, "filename": "kamikaze-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d4df725386c17ab431ec8a4b45dc5932", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8952, "upload_time": "2014-11-20T19:21:42", "url": "https://files.pythonhosted.org/packages/33/1c/39afb4a7bd73d6d04192a6d6ab892cacec4c09dc2355cd1b6da1700ec910/kamikaze-0.1.1.tar.gz" } ] }