Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
AMQPStorm-Pool
AMQPStorm connection pooling based on pika-pool.
usage
Get it:
pip install amqpstorm-pool
and use it:
import json
import amqpstorm
import amqpstorm_pool
uri = 'amqp://guest:guest@localhost:5672/%2F?heartbeat=60'
pool = amqpstorm_pool.QueuedPool(
create=lambda: amqpstorm.UriConnection(uri),
max_size=10,
max_overflow=10,
timeout=10,
recycle=3600,
stale=45,
)
with pool.acquire() as cxn:
cxn.channel.queue.declare('fruits')
cxn.channel.basic.publish(
body=json.dumps({
'type': 'banana',
'description': 'they are yellow'
}),
exchange='',
routing_key='fruits',
properties={
'content_type': 'text/plain',
'headers': {'key': 'value'}
}
)
Release files for AMQPStorm-Pool 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| AMQPStorm-Pool-1.0.1.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| AMQPStorm_Pool-1.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / AMQPStorm-Pool-1.0.1.tar.gz
| Download URL | AMQPStorm-Pool-1.0.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbd06448fe42451b941e50371bdc225c97425cb7fe52308d612d96d7190e23d2
|
|
BLAKE2b-256 checksum How to use checksums |
57c99a50ebbcd173837ff7973e4ca9eae35f86ae5aaf9f77a649fcce1715c6e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
|
Release files / AMQPStorm_Pool-1.0.1-py2.py3-none-any.whl
| Download URL | AMQPStorm_Pool-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ac25765a06234933c252089323611a44dce1cddd4d33355af044974ac68b3560
|
|
BLAKE2b-256 checksum How to use checksums |
2164f4f0eac4cd2f510577ab10c87bb09e82a1605a6d34bb45cd9b908c96f382
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
|