METADATA 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. Metadata-Version: 2.0
  2. Name: librabbitmq
  3. Version: 1.6.1
  4. Summary: AMQP Client using the rabbitmq-c library.
  5. Home-page: http://github.com/celery/librabbitmq
  6. Author: Ask Solem
  7. Author-email: ask@celeryproject.org
  8. License: MPL
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Operating System :: POSIX
  12. Classifier: Operating System :: Microsoft :: Windows
  13. Classifier: Programming Language :: C
  14. Classifier: Programming Language :: Python :: 2.5
  15. Classifier: Programming Language :: Python :: 2.6
  16. Classifier: Programming Language :: Python :: 2.7
  17. Classifier: Programming Language :: Python :: Implementation :: CPython
  18. Classifier: Intended Audience :: Developers
  19. Classifier: License :: OSI Approved :: Mozilla Public License 1.0 (MPL)
  20. Classifier: Topic :: Communications
  21. Classifier: Topic :: System :: Networking
  22. Classifier: Topic :: Software Development :: Libraries
  23. Requires-Dist: amqp (>=1.4.6)
  24. ================================================================
  25. librabbitmq - Python AMQP Client using the rabbitmq-c library.
  26. ================================================================
  27. :Version: 1.6.0
  28. :Download: http://pypi.python.org/pypi/librabbitmq/
  29. :Code: http://github.com/celery/librabbitmq/
  30. :Keywords: rabbitmq, amqp, messaging, librabbitmq, rabbitmq-c, python,
  31. kombu, celery
  32. .. contents::
  33. :local:
  34. Python bindings to the RabbitMQ C-library `rabbitmq-c`_.
  35. Supported by Kombu and Celery.
  36. .. _`rabbitmq-c`: https://github.com/alanxz/rabbitmq-c
  37. Installation
  38. ============
  39. Install via pip::
  40. $ pip install librabbitmq
  41. or, install via easy_install::
  42. $ easy_install librabbitmq
  43. Downloading and installing from source
  44. --------------------------------------
  45. Download the latest version from
  46. http://pypi.python.org/pypi/librabbitmq/
  47. Then install it by doing the following,::
  48. $ tar xvfz librabbitmq-0.0.0.tar.gz
  49. $ cd librabbitmq-0.0.0
  50. $ python setup.py build
  51. # python setup.py install # as root
  52. Using the development version
  53. -----------------------------
  54. You can clone the repository by doing the following::
  55. $ git clone git://github.com/celery/librabbitmq.git
  56. Then install it by doing the following::
  57. $ cd librabbitmq
  58. $ make install # or make develop
  59. Examples
  60. ========
  61. Using with Kombu::
  62. >>> from kombu import Connection
  63. >>> x = Connection("librabbitmq://")
  64. Stand-alone::
  65. >>> from librabbitmq import Connection
  66. >>> conn = Connection(host="localhost", userid="guest",
  67. ... password="guest", virtual_host="/")
  68. >>> channel = conn.channel()
  69. >>> channel.exchange_declare(exchange, type, ...)
  70. >>> channel.queue_declare(queue, ...)
  71. >>> channel.queue_bind(queue, exchange, routing_key)
  72. Producing
  73. ---------
  74. ::
  75. >>> channel.basic_publish(body, exchange, routing_key, ...)
  76. Consuming
  77. ---------
  78. ::
  79. >>> def dump_message(message):
  80. ... print("Body:'%s', Proeprties:'%s', DeliveryInfo:'%s'" % (
  81. ... message.body, message.properties, message.delivery_info))
  82. ... message.ack()
  83. >>> channel.basic_consume(queue, ..., callback=dump_message)
  84. >>> while True:
  85. ... connection.drain_events()
  86. Poll
  87. ----
  88. ::
  89. >>> message = channel.basic_get(queue, ...)
  90. >>> if message:
  91. ... dump_message(message)
  92. ... print("Body:'%s' Properties:'%s' DeliveryInfo:'%s'" % (
  93. ... message.body, message.properties, message.delivery_info))
  94. Other
  95. -----
  96. ::
  97. >>> channel.queue_unbind(queue, ...)
  98. >>> channel.close()
  99. >>> connection.close()
  100. License
  101. =======
  102. This software is licensed under the ``Mozilla Public License``.
  103. See the ``LICENSE-MPL-RabbitMQ`` file in the top distribution directory
  104. for the full license text.
  105. .. # vim: syntax=rst expandtab tabstop=4 shiftwidth=4 shiftround