RabbitMQ extension for yhttp.
Project description
yhttp-rabbitmq
RabbitMQ extension for yhttp.
Install
pip install yhttp-pony
Usage
from yhttp import Application
from yhttp.ext.rabbitmq import install as rabbitmq_install
app = Application()
rabbitmq_install(app)
app.settings.merge('''
rabbitmq:
host: localhost
port: 5672
virtualhost: /
user: guest
password: guest
channel_max: 10
connection_attempts: 3
ssl:
ca_certfile: <ca_cert>
certfile: <client_cert>
keyfile: <client_key>
commonname: <CN>
pool:
maxsize: 10
maxoverflow: 10
timeout: 10
recycle: 3600
stale: 45
''')
app.ready()
@app.route()
def get(req):
with app.rabbitmq.acquire() as cxn:
cxn.channel.basic_publish(
body='banana',
exchange='',
routing_key='fruits',
properties=pika.BasicProperties(
content_type='text/plain',
content_encoding='utf-8',
delivery_mode=2,
)
)
app.ready()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yhttp-rabbitmq-1.0.0.tar.gz
(6.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
yhttp_rabbitmq-1.0.0-py3.8.egg
(11.3 kB
view details)
File details
Details for the file yhttp-rabbitmq-1.0.0.tar.gz.
File metadata
- Download URL: yhttp-rabbitmq-1.0.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe7afb4453eac3b6214948b75047b61e7dff6987385157cd7340d8a74f5f9c8d
|
|
| MD5 |
473007729724c3210d4bb45e1303481f
|
|
| BLAKE2b-256 |
d481c9711c4954b0e393f92e6182a5ff9233ca2ef823dd36d5819dc5ddc744b7
|
File details
Details for the file yhttp_rabbitmq-1.0.0-py3.8.egg.
File metadata
- Download URL: yhttp_rabbitmq-1.0.0-py3.8.egg
- Upload date:
- Size: 11.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6fe177ce48ee4e08b61986b7f0cd09aa509c43900486b4d8531cfd0daf83b4a
|
|
| MD5 |
c73602fcdc8c22a02cc58de0a82c94a3
|
|
| BLAKE2b-256 |
4fe7692fd4d6742bd9ea9f388b0f9cae2ef5be74bc0d99f846faefb2f1fb110d
|