cloudfiles.connection.ConnectionPool

Package cloudfiles :: Module connection :: Class ConnectionPool |
[frames] | no frames]

# Class ConnectionPool

source code

A thread-safe connection pool object.

This component isn't required when using the cloudfiles library, but it may be useful when building threaded applications.

Instance Methods
__init__(self, username=None, api_key=None, **kwargs) | source code
Connection |
get(self) Return a cloudfiles connection object. | source code
put(self, connobj) Place a cloudfiles connection object back into the pool. | source code
Inherited from `Queue.Queue`: `empty`, `full`, `get_nowait`, `join`, `put_nowait`, `qsize`, `task_done`

Method Details

### __init__(self, username=None, api_key=None, **kwargs) (Constructor) | source code
Overrides: Queue.Queue.__init__

### get(self) | source code
Return a cloudfiles connection object. Returns: Connection a cloudfiles connection object Overrides: Queue.Queue.get

### put(self, connobj) | source code
Place a cloudfiles connection object back into the pool. Parameters: `connobj` (Connection) - a cloudfiles connection object Overrides: Queue.Queue.put