{ "info": { "author": "Scott Crespo", "author_email": "sccrespo@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# CloeePy-RabbitMQ\nRabbitMQ Plugin for the CloeePy Framework\n\nAttaches a RabbitMQ connection to CloeePy application context.\n\n## Installation\n\n`pip install CloeePy-RabbitMQ`\n\n## Configuration\n\n### Configuration Basics\nCloeePy-RabbitMQ configuration must be placed under `CloeePy.Plugins.cloeepy_rabbitmq` in your config file.\nThe parameters are simply the available `Pika.ConnectionParameters` and `Pika.Credentials`.\nFor more information on possible configurations please see\n[Pika's Documentation](https://pika.readthedocs.io/en/0.10.0/intro.html)\n\n```\nCloeePy:\n ...\n Plugins:\n cloeepy_rabbitmq:\n connectionClass: BlockingConnection\n connection:\n host: localhost\n port: 5672\n credentials:\n username: guest\n password: guest\n```\n\n### Connection Class\n\nYou must specify which of [Pika's Connection Adapters](https://pika.readthedocs.io/en/0.10.0/modules/adapters/index.html#adapters)\nyou wish to connect with via the `connectionClass` setting. Options are `BlockingConnection` and `SelectConnection`.\n\n### Customize Plugin Namespace\n\nBy default, your connection is available on the CloeePy application context as\n`app.rabbitmq`. Optionally you can specify a different namespace by which you access\nthe rabbitmq connection via `pluginNamespace`.\n\n```\n...\nPlugins:\ncloeepy_rabbitmq:\n pluginNamespace: customRabbitMQNS\n connectionClass: BlockingConnection\n connection:\n host: localhost\n port: 5672\n credentials:\n username: guest\n password: guest\n\n```\n\nThen, you would access your Redis connection on the application context like so:\n\n```\napp = CloeePy()\nresult = app.customRabbitMQNS.ping()\napp.log.info(result)\n```\n\n### Optional Environment Variables\n\nIt's best practice NOT to store sensitive data, such as database usernames and passwords,\nin plain-text configuration files. Thus, CloeePy-RabbitMQ supports configuring your\npassword via environment variable.\n\nYou need to set the following:\n\n- Username: `CLOEEPY_RABBITMQ_USERNAME`\n- Password: `CLOEEPY_RABBITMQ_PASSWORD`\n\nBy doing so, you can omit `username` and `password` in your configuration file.\n\n\n## Usage\n```\nimport os\nfrom cloeepy import CloeePy\n\nif __name__ == \"__main__\":\n # Required: set config path as environment variable\n os.environ[\"CLOEEPY_CONFIG_PATH\"] = \"./example-config.yml\"\n\n # instantiate application instance\n app = CloeePy()\n\n # Check if RabbitMQ Connection is alive\n if app.rabbitmq.is_open:\n app.log.info(\"RabbitMQ conection is open\")\n else:\n app.log.error(\"RabbitMQ connection is not open\")\n```\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cloeeai/CloeePy-RabbitMQ", "keywords": "mini framework cloee cloeepy rabbitmq", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "CloeePy-RabbitMQ", "package_url": "https://pypi.org/project/CloeePy-RabbitMQ/", "platform": "", "project_url": "https://pypi.org/project/CloeePy-RabbitMQ/", "project_urls": { "Homepage": "https://github.com/cloeeai/CloeePy-RabbitMQ" }, "release_url": "https://pypi.org/project/CloeePy-RabbitMQ/0.0.0/", "requires_dist": null, "requires_python": "", "summary": "RabbitMQ Plugin for CloeePy Framework", "version": "0.0.0" }, "last_serial": 3622899, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "46a7896e4733938bd4a7fdcc8e34008b", "sha256": "0bafd56c9bf3ef3686c86f6938287a5c7e15ffc10f0e73d10d87af10d82a9480" }, "downloads": -1, "filename": "CloeePy-RabbitMQ-0.0.0.tar.gz", "has_sig": false, "md5_digest": "46a7896e4733938bd4a7fdcc8e34008b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3949, "upload_time": "2018-02-27T20:08:00", "url": "https://files.pythonhosted.org/packages/52/0f/9ac80026129bf940d79b9cd84e66b8f8018a949bd39e9cc8bef328f0b8ab/CloeePy-RabbitMQ-0.0.0.tar.gz" } ], "0.0.0-rc1": [ { "comment_text": "", "digests": { "md5": "e89a22ab0f620224831e7bd1e6c83490", "sha256": "f60eba95ccb637902b8e9fbf8a55c5b30dfde63243fcc0297eb718e100ec4908" }, "downloads": -1, "filename": "CloeePy-RabbitMQ-0.0.0-rc1.tar.gz", "has_sig": false, "md5_digest": "e89a22ab0f620224831e7bd1e6c83490", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3956, "upload_time": "2018-02-27T20:04:40", "url": "https://files.pythonhosted.org/packages/7a/e0/f7969aea2d03af13316da2e160a514e75dbda903196a721bea0dff8f2fd0/CloeePy-RabbitMQ-0.0.0-rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46a7896e4733938bd4a7fdcc8e34008b", "sha256": "0bafd56c9bf3ef3686c86f6938287a5c7e15ffc10f0e73d10d87af10d82a9480" }, "downloads": -1, "filename": "CloeePy-RabbitMQ-0.0.0.tar.gz", "has_sig": false, "md5_digest": "46a7896e4733938bd4a7fdcc8e34008b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3949, "upload_time": "2018-02-27T20:08:00", "url": "https://files.pythonhosted.org/packages/52/0f/9ac80026129bf940d79b9cd84e66b8f8018a949bd39e9cc8bef328f0b8ab/CloeePy-RabbitMQ-0.0.0.tar.gz" } ] }