Notice
just support twisted connection now
Usage
sample:
# with connection
from pika import URLParameters
from pooled_pika import PooledConn
AMQP_PARAM = URLParameters('amqp://user:pwd@amqpserver')
pooled_conn = PooledConn(AMQP_PARAM)
d = pooled_conn.acquire()
d.addCallbacks(_on_conn, _on_err_conn) # you will get a TwistedProtocolConnection object
d.addErrback(_on_err)
d.addBoth(pooled_conn.release) # must release what acquired anyway
or:
# with channel
from pika import URLParameters
from pooled_pika import PooledConn
AMQP_PARAM = URLParameters('amqp://user:pwd@amqpserver')
pooled_conn = PooledConn(AMQP_PARAM)
d = pooled_conn.acquire(channel=True)
d.addCallbacks(_on_channel, _on_err_channel) # you will get a TwistedChannel object
d.addErrback(_on_err)
d.addBoth(pooled_conn.release) # must release what acquired anyway
Release files for pooled-pika 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pooled-pika-0.3.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pooled_pika-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / pooled-pika-0.3.0.tar.gz
| Download URL | pooled-pika-0.3.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3137b73c1e509e4c4a487c12942dc972da15a0993965840f79012c66cd7c7861
|
|
BLAKE2b-256 checksum How to use checksums |
7b801e174cd913c378a338e862ae8a7f3e69c688119095a485732cefd532d3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / pooled_pika-0.3.0-py3-none-any.whl
| Download URL | pooled_pika-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2f05e350bfc72a9bdda63bcb32d92ff1f4a848a1a9baae9541729afe243bdfd
|
|
BLAKE2b-256 checksum How to use checksums |
6472b1e633732e20303cd59f9a807009bd7bfc5f6e0bd4fad026069396209085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|