Skip to main content
Help us improve Python packaging – donate today!

An extensible driver framework with pooling

Project Description

© 2013 Urban Airship

https://github.com/urbanairship/kiddiepool

https://secure.travis-ci.org/urbanairship/kiddiepool.png?branch=master

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

  1. Create a list of "<host>:<port>" strings to target for connections.
  2. Instantiate a KiddiePool with that list of strings.
  3. Pass the KiddiePool instance to your KiddieClient subclass for use.
  4. Use your client’s API and it will use the pool automatically.

Using a dynamic pool

Note

Ensure you have installed the package with zookeeper support.

  1. Instantiate a TidePool with the Zookeeper quorum and znode whose children to monitor.
  2. Use a context manager with TidePool() as pool: or the start() and stop() methods to manage the connection to Zookeeper.
  3. Use the dynamic pool exactly like the static pool. Candidates will be added/removed from the pool by a background thread.

Release history Release notifications

This version
History Node

2.0.0

History Node

1.0.2

History Node

1.0.1

History Node

0.3.0

History Node

0.2.1

History Node

0.2.0

History Node

0.1.6

History Node

0.1.2

History Node

0.1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
kiddiepool-2.0.0-py2.7.egg (25.5 kB) Copy SHA256 hash SHA256 Egg 2.7 Apr 11, 2018
kiddiepool-2.0.0-py3.6.egg (25.8 kB) Copy SHA256 hash SHA256 Egg 3.6 Apr 11, 2018
kiddiepool-2.0.0.tar.gz (9.2 kB) Copy SHA256 hash SHA256 Source None Apr 11, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page