An extensible driver framework with pooling
Project description
© 2013 Urban Airship
https://github.com/urbanairship/kiddiepool
Goals
Create a reusable connection pool class that handles failover
Optionally allow connection pool to discover service locations via Zookeeper
Installation
pip install kiddiepool # without optional zookeeper support
pip install kiddiepool[zookeeper] # with optional zookeeper support
Creating a New Client
Subclass at least KiddieClient to create the public API for your client driver. Should call KiddieClient._sendall(<str>) to send data.
Using the Pool
Using a static pool
Create a list of "<host>:<port>" strings to target for connections.
Instantiate a KiddiePool with that list of strings.
Pass the KiddiePool instance to your KiddieClient subclass for use.
Use your client’s API and it will use the pool automatically.
Using a dynamic pool
Instantiate a TidePool with the Zookeeper quorum and znode whose children to monitor.
Use a context manager with TidePool() as pool: or the start() and stop() methods to manage the connection to Zookeeper.
Use the dynamic pool exactly like the static pool. Candidates will be added/removed from the pool by a background thread.
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
Built Distributions
File details
Details for the file kiddiepool-2.0.0.tar.gz
.
File metadata
- Download URL: kiddiepool-2.0.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52d606fdd93959c63e24dd54fdbfc339f75e5185e007851fad9290a5f294c002 |
|
MD5 | 0300407da809f40fb7d76c098b93c390 |
|
BLAKE2b-256 | 9cb1d5f5c97feab2da4103303953444a84c86899e5e0b3d0f9fa0392ceccdb63 |
File details
Details for the file kiddiepool-2.0.0-py3.6.egg
.
File metadata
- Download URL: kiddiepool-2.0.0-py3.6.egg
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc2b4ab01c089aef8e81a0b1f0beebececb1c7a07802fcfc8f579f1084435cd2 |
|
MD5 | 11740490ae01981f12eac7dfac434592 |
|
BLAKE2b-256 | 89df6bf910c275b57ab7a51c13088a63dfb57cde60b65191a370dd06179bdfa4 |
File details
Details for the file kiddiepool-2.0.0-py2.7.egg
.
File metadata
- Download URL: kiddiepool-2.0.0-py2.7.egg
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07741caec7fcd915c111d651432310d0e04b3354268f00d623ff8c9d3815aae6 |
|
MD5 | 8ebc558c1924f7fbc0cd0658dfedf35a |
|
BLAKE2b-256 | 41655e01e57018599cfa0af09949f7848ab725993a2695dd3d64e869af983832 |