{ "info": { "author": "Evgeni Pandurski", "author_email": "epandurski@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-Melodramatiq\n==================\n\n**Flask-Melodramatiq** is a `Flask`_ extension that adds support for\nthe `Dramatiq`_ task processing library.\n\n`Dramatiq`_ is a great library, and Flask-Melodramatiq tries hard not\nto force you to change the way you interact with\nit. Flask-Melodramatiq defines thin wrappers around the broker types\navailable in Dramatiq, so that all the power of Dramatiq's API remains\navailable to you.\n\nFor example::\n\n import dramatiq\n from flask import Flask\n from flask_melodramatiq import RabbitmqBroker\n\n app = Flask(__name__)\n broker = RabbitmqBroker(app)\n dramatiq.set_broker(broker)\n\n @dramatiq.actor\n def task():\n print('Snakes appreciate good theatrical preformace.')\n\nor, if you prefer the Flask application factory pattern::\n\n import dramatiq\n from flask import Flask\n from flask_melodramatiq import RabbitmqBroker\n\n broker = RabbitmqBroker()\n dramatiq.set_broker(broker)\n\n @dramatiq.actor\n def task():\n print('Snakes appreciate good theatrical preformace.')\n\n def create_app():\n app = Flask(__name__)\n broker.init_app(app)\n return app\n\nIn those examples, the ``broker`` instance that we created (we call it\na \"lazy broker\") is a genuine `Dramatiq`_ broker, and can be used\nanywhere where a \"native\" broker can be used. (It has\n``dramatiq.brokers.rabbitmq.RabbitmqBroker`` as a superclass!) Lazy\nbrokers are thin wrappers which add several important features:\n\n1. They honor the settings in the Flask application configuration.\n\n2. ``init_app`` can be called on them *before or after* the\n actors have been defined.\n\n3. The Flask application context is correctly set during the execution\n of the tasks.\n\n4. They add few convenience methods. (The ``Broker.actor`` decorator\n for example.)\n\n\nConfiguration\n-------------\n\nYou can change the configuration options for your broker by passing\nkeyword arguments to the constructor, or by setting corresponding\nvalues for the ``DRAMATIQ_BROKER_*`` set of keys in the app\nconfig. For example, you can do either::\n\n from flask_melodramatiq import RabbitmqBroker\n\n broker = RabbitmqBroker(\n url='amqp://mybroker:5672', confirm_delivery=True)\n\nor you can put this in your app config::\n\n DRAMATIQ_BROKER_URL = 'amqp://mybroker:5672'\n DRAMATIQ_BROKER_CONFIRM_DELIVERY = True\n\nIf the configuration values passed to the constructor are different\nfrom the ones set in the app config, the later take precedence. You\ncan even set/override the type of the broker in the app config::\n\n from flask_melodramatiq import Broker\n\n broker = Broker() # Broker's type is not specified here.\n\nand instead, specify the type in the app config::\n\n DRAMATIQ_BROKER_CLASS = 'StubBroker'\n\nThis feature can be quite useful when testing your code.\n\n\nStarting workers\n----------------\n\nWith Flask-Melodramatiq you have the whole power of Dramatiq's CLI on\non your disposal. For example, to start worker processes for your\nbroker instance you may run::\n\n $ dramatiq wsgi:broker\n\nand in ``wsgi.py`` you may have something like this::\n\n from myapp import create_app, broker\n\n app = create_app()\n\nYou may have as many broker instances as you want, but you need to\nstart each one of them with a separate command.\n\n\nInstallation\n------------\n\nYou can install Flask-Melodramatiq with ``pip``::\n\n $ pip install Flask-Melodramatiq\n\n\n\nYou can read the docs `here`_.\n\n\n.. _here: https://flask-melodramatiq.readthedocs.io/en/latest/\n.. _Dramatiq: https://github.com/Bogdanp/dramatiq\n.. _Flask: http://flask.pocoo.org/", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/epandurski/flask_melodramatiq", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-Melodramatiq", "package_url": "https://pypi.org/project/Flask-Melodramatiq/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Melodramatiq/", "project_urls": { "Bug Tracker": "https://github.com/epandurski/flask_melodramatiq/issues", "Documentation": "https://flask-melodramatiq.readthedocs.io/en/latest/", "Homepage": "https://github.com/epandurski/flask_melodramatiq", "Source Code": "https://github.com/epandurski/flask_melodramatiq" }, "release_url": "https://pypi.org/project/Flask-Melodramatiq/0.3.7/", "requires_dist": null, "requires_python": "", "summary": "A Flask extension that adds support for the \"dramatiq\" task processing library", "version": "0.3.7" }, "last_serial": 5794183, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "59a9deb340b4d4048a84d8675be73bc7", "sha256": "55a3a90c4142841b32e8d455b4b598246bd86fd28e4f1c31315b57528e43ebd1" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.1.tar.gz", "has_sig": false, "md5_digest": "59a9deb340b4d4048a84d8675be73bc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4351, "upload_time": "2019-03-13T15:15:43", "url": "https://files.pythonhosted.org/packages/cb/c6/1d5a9366c22b0afb45117c07903f101da694a45b7173c70341f38e1f8349/Flask-Melodramatiq-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b85f68c16652f32a292a5509b0bc5366", "sha256": "eb5f6f5bf91d74b8c3d56e9ebd4206da68f64fc4ba63c5b023733a4fcc8df553" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.2.tar.gz", "has_sig": false, "md5_digest": "b85f68c16652f32a292a5509b0bc5366", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7015, "upload_time": "2019-03-17T11:03:42", "url": "https://files.pythonhosted.org/packages/0e/1e/3a45dab6023cbaa9cd837dacb6598916e90e29c8363a70523ded95fc00e2/Flask-Melodramatiq-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "0d6c8aae38c6064f54dfd288e199ccd7", "sha256": "67252bccb2a3af95e3cf54db57e68a81bffbae67f7dce4637b2ff9330869f84c" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.tar.gz", "has_sig": false, "md5_digest": "0d6c8aae38c6064f54dfd288e199ccd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8751, "upload_time": "2019-03-21T13:56:15", "url": "https://files.pythonhosted.org/packages/39/6f/7af08121f108e877bb20e1a5ea3c5403897ac93798a1d6c1a8656ad6ac9b/Flask-Melodramatiq-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "7c9217e347a645826890c030b6615946", "sha256": "df5ba718242c443ec224d03b7f3fb90e649a00cea85658a0d880002802a01cfb" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.1.tar.gz", "has_sig": false, "md5_digest": "7c9217e347a645826890c030b6615946", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9308, "upload_time": "2019-03-23T13:37:17", "url": "https://files.pythonhosted.org/packages/a7/1f/2856600d4b79d984a204cc4f51fe9487322e2b25b4ed1445b6d5086e1838/Flask-Melodramatiq-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "dd1ef3ffed57e0c7394d8c31e5d47ef4", "sha256": "17ffbf8b8013ce05bd86c0233633835a90575e7e22abe3c2e455240195e28df4" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.2.tar.gz", "has_sig": false, "md5_digest": "dd1ef3ffed57e0c7394d8c31e5d47ef4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10011, "upload_time": "2019-03-26T08:06:37", "url": "https://files.pythonhosted.org/packages/30/fb/6c41557f81feebb244d15d9c7f0d56970ff8e0362512dacc30cba35949a3/Flask-Melodramatiq-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "9c9e6063b1bd571abf89864885cc21c3", "sha256": "2515f5e66b757066bc69c4ecce1319b73d21b217861835ae7bae17a9c4456e2a" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.3.tar.gz", "has_sig": false, "md5_digest": "9c9e6063b1bd571abf89864885cc21c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10044, "upload_time": "2019-03-26T23:54:10", "url": "https://files.pythonhosted.org/packages/1e/b0/7c831d0572baba2156a36fa62461ab055097f38843f3bf7afda0b81c501d/Flask-Melodramatiq-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "5f432508f3f7a396175dced7b872521c", "sha256": "ccfa3b3df6febbfda0b66fe1e26f82dd85ae5520c93ff8b6f0f9eb5668aadbd0" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.4.tar.gz", "has_sig": false, "md5_digest": "5f432508f3f7a396175dced7b872521c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10972, "upload_time": "2019-04-02T13:28:13", "url": "https://files.pythonhosted.org/packages/3b/cf/ee04c4defa1875cf93ea82f2687616cc48658dd724b73384581ae60d0aaf/Flask-Melodramatiq-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "8232c3a2f86dc640a76a5a3afff6cbe8", "sha256": "9a769c777e204435fea5594d41af831048eee0fa9c4ffc4510150fe37e20f486" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.5.tar.gz", "has_sig": false, "md5_digest": "8232c3a2f86dc640a76a5a3afff6cbe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11025, "upload_time": "2019-05-11T11:00:35", "url": "https://files.pythonhosted.org/packages/91/23/273a0febd131a41de495f3d0bff6eff94c5b83b593c46dad6298ae4f2037/Flask-Melodramatiq-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "80b14afd7308c323a37009c16de9d0ed", "sha256": "8b59790810880787cdce2ede8fe8797969cfb7ddc1480122355df05168990325" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.6.tar.gz", "has_sig": false, "md5_digest": "80b14afd7308c323a37009c16de9d0ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11199, "upload_time": "2019-06-23T15:34:49", "url": "https://files.pythonhosted.org/packages/83/96/d5ab730ccb7dd60a1fc37027928c94add051b93b4473fffffb8345fc4360/Flask-Melodramatiq-0.3.6.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "8601e38fc95fe59eade56d7e6cd0cb8b", "sha256": "17ff0e48a02c0652a4776abd67cbd6ba8e2de29e36540ded25ab2247ece94dbb" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.7.tar.gz", "has_sig": false, "md5_digest": "8601e38fc95fe59eade56d7e6cd0cb8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11208, "upload_time": "2019-09-06T22:12:01", "url": "https://files.pythonhosted.org/packages/61/20/20086a227001c27a821a25c989297cf950ca2ba248f52861974343b547e9/Flask-Melodramatiq-0.3.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8601e38fc95fe59eade56d7e6cd0cb8b", "sha256": "17ff0e48a02c0652a4776abd67cbd6ba8e2de29e36540ded25ab2247ece94dbb" }, "downloads": -1, "filename": "Flask-Melodramatiq-0.3.7.tar.gz", "has_sig": false, "md5_digest": "8601e38fc95fe59eade56d7e6cd0cb8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11208, "upload_time": "2019-09-06T22:12:01", "url": "https://files.pythonhosted.org/packages/61/20/20086a227001c27a821a25c989297cf950ca2ba248f52861974343b547e9/Flask-Melodramatiq-0.3.7.tar.gz" } ] }