{ "info": { "author": "Reed Wade for Artella.com", "author_email": "reed@artella.com", "bugtrack_url": null, "classifiers": [], "description": "PikaTopic - a convenience layer atop Pika for use with RabbitMQ topic exchanges\n===============================================================================\n\nPika is a good general purpose library for interacting with a RabbitMQ\nserver. PikaTopic is a simpler, limited interface which can be used when\nyou just need to send or receive messages using a topic exchange.\n\nAdditionally, PikaTopic will handle json conversion when sending and\nreceiving data.\n\nSee https://github.com/AnimationMentor/pikatopic for more usage\nexamples.\n\nConfiguration\n-------------\n\nYou will probably need to set the host name to connect to your RabbitMQ\nserver. The username, password and exchange are all set to defaults\nwhich work for a generic server install.\n\nDefault values:\n\n- host is ``localhost`` OR the ``PIKATOPIC_HOST`` envariable if that is\n set\n- username is ``guest`` OR the ``PIKATOPIC_USERNAME`` envariable if\n that is set\n- password is ``guest`` OR the ``PIKATOPIC_PASSWORD`` envariable if\n that is set\n- exchange is ``amq.topic`` OR the ``PIKATOPIC_EXCHANGE`` envariable if\n that is set\n\nThese may be overridden by passing any of these arguments to the\n``PikaTopic`` class initialiser or you can change them at the module\nlevel by:\n\n::\n\n import pikatopic\n\n pikatopic.DEFAULT_USERNAME = 'otheruser'\n pikatopic.DEFAULT_PASSWORD = 'secrt'\n pikatopic.DEFAULT_HOST = '172.17.0.2'\n pikatopic.DEFAULT_EXCHANGE = 'monster'\n\nPika Library\n------------\n\nPikatopic depends on the pika libary.\n\n- http://pika.readthedocs.io/\n\nExamples\n--------\n\n::\n\n from pikatopic import PikaTopic\n\n with PikaTopic(host='172.17.0.2') as pt:\n pt.sendData(\n \"project.new\",\n {\n 'project_id':\"12345-12345\",\n 'name':\"The Amazing Adventures of Sausage Farts The Dog\",\n 'creator_id':\"676867-45657\",\n },\n )\n\n::\n\n from pikatopic import PikaTopic\n\n def handler(routing_key, message, message_data):\n if message_data:\n print(\"%r data=%r\" % (routing_key, message_data))\n else:\n print(\"%r text=%r\" % (routing_key, message))\n return True\n\n\n with PikaTopic(host='172.17.0.2') as pt:\n pt.listen(handler, ['#'])\n\nReference\n---------\n\nThis library provides a class, ``PikaTopic`` which can be used for\nsending and receiving messages.\n\nUnless using the ``with`` construct as in the examples above, you must\ncall ``open()`` and ``close()`` before and after the ``send...()`` and\n``listen()`` functions.\n\nSending\n~~~~~~~\n\n::\n\n sendText(routing_key (string), message (string))\n\n::\n\n sendData(routing_key (string), message (dict or list))\n\nThe ``sendData`` method converts the message to a json string and sets\nthe message content\\_type property to application/json.\n\nReceiving\n~~~~~~~~~\n\n::\n\n listen(handler (function), binding_keys (list of strings))\n\nThe ``listen`` method enters an event loop which normally does not\nreturn.\n\nIt accepts a handler function which is called for each message received.\n\n::\n\n handler(routing_key, message_text, message_data)\n\n``message_text`` contains the raw text of the message. If the message is\njson encoded then ``message_data`` contains the decoded dict otherwise\nit is set to ``None``.\n\nIf the handler returns a false value, the ``listen()`` loop will return.\n\nServerless Testing\n~~~~~~~~~~~~~~~~~~\n\nPass ``no_rabbit_server=True`` to the class initialiser to run without\nconnecting to a server.\n\nThis might be useful for testing or transition.\n\nYou may want to also set ``verbose=True``\n\nVerbose\n~~~~~~~\n\nPass ``verbose=True`` to the class initialiser to get messages sent to\nstdout by the listen() and send...() functions.\n\nThanks, Artella!\n================\n\nThis work was funded by Artella ( https://www.artella.com/ ).\n", "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/AnimationMentor/pikatopic", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pikatopic", "package_url": "https://pypi.org/project/pikatopic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pikatopic/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/AnimationMentor/pikatopic" }, "release_url": "https://pypi.org/project/pikatopic/1.0.4/", "requires_dist": null, "requires_python": null, "summary": "A convenience layer atop Pika for use with RabbitMQ topic exchanges.", "version": "1.0.4" }, "last_serial": 2543697, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "95a139423d895810d70db403e6c21338", "sha256": "80de7cd2f0527deb0a1986ea0725fab0a0d84ab9f2ffee19e2a712b20c2ecb1e" }, "downloads": -1, "filename": "pikatopic-1.0.0.tar.gz", "has_sig": false, "md5_digest": "95a139423d895810d70db403e6c21338", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4067, "upload_time": "2016-12-28T11:51:09", "url": "https://files.pythonhosted.org/packages/84/34/80257a6a2ffcae3e965dc08765655b109a49278cfd7618fcb36c76c59a8c/pikatopic-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "62c4aaf6c1121cd5a37d5ebfd6f5c543", "sha256": "0420bcdabddb368eaf8ba06ffb51759bae1dc4011e2bfa96dd9c94a6cbf74be5" }, "downloads": -1, "filename": "pikatopic-1.0.1.tar.gz", "has_sig": false, "md5_digest": "62c4aaf6c1121cd5a37d5ebfd6f5c543", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3993, "upload_time": "2016-12-28T12:13:44", "url": "https://files.pythonhosted.org/packages/97/3c/042c204d37143e3ea7e8745a1e19f2abd684a62e8445bbad10c5304172dc/pikatopic-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "0dbb360e753425bb0bebf29ecc8c5c2f", "sha256": "7ef9d6a59ccf2d0c0adab8a8feb943f54f8e9a170574b1a8c9f7431bb9815715" }, "downloads": -1, "filename": "pikatopic-1.0.2.tar.gz", "has_sig": false, "md5_digest": "0dbb360e753425bb0bebf29ecc8c5c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3995, "upload_time": "2016-12-28T12:23:32", "url": "https://files.pythonhosted.org/packages/fe/1b/d4594d12aaa2aa8a88b589a9e15d36bbd516183eb45437a106e3d36feeb1/pikatopic-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "17815858aa8ce31eb07b7327cc45c45c", "sha256": "2b05f07113e6af51c7691bb92f498b33e9b012680c429ea9b6f88f8ae3fdd17a" }, "downloads": -1, "filename": "pikatopic-1.0.3.tar.gz", "has_sig": false, "md5_digest": "17815858aa8ce31eb07b7327cc45c45c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3988, "upload_time": "2016-12-28T12:27:05", "url": "https://files.pythonhosted.org/packages/f1/88/bc31ed3fb0b222f6f52ff009a573946fcf7f1b1f72b80148139f9a5077f0/pikatopic-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "d023c47703d741885f6b0861ce65ff35", "sha256": "86f3bae53fd3a54be145ef8b5c4d5e3d2e706d9fef89db9696b07b9647142b93" }, "downloads": -1, "filename": "pikatopic-1.0.4.tar.gz", "has_sig": false, "md5_digest": "d023c47703d741885f6b0861ce65ff35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4029, "upload_time": "2016-12-29T06:39:55", "url": "https://files.pythonhosted.org/packages/1d/55/e818ce7b059b2030a04b77c085dfd5c7a5991079f164526df1259d575864/pikatopic-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d023c47703d741885f6b0861ce65ff35", "sha256": "86f3bae53fd3a54be145ef8b5c4d5e3d2e706d9fef89db9696b07b9647142b93" }, "downloads": -1, "filename": "pikatopic-1.0.4.tar.gz", "has_sig": false, "md5_digest": "d023c47703d741885f6b0861ce65ff35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4029, "upload_time": "2016-12-29T06:39:55", "url": "https://files.pythonhosted.org/packages/1d/55/e818ce7b059b2030a04b77c085dfd5c7a5991079f164526df1259d575864/pikatopic-1.0.4.tar.gz" } ] }