pool – Pool module for use with a MongoDB connection.

class pymongo.pool.GreenletPool(*args, **kwargs)

A simple connection pool.

Calling start_request() acquires a greenlet-local socket, which is returned to the pool when the greenlet calls end_request() or dies.

class pymongo.pool.Pool(*args, **kwargs)

A simple connection pool.

Calling start_request() acquires a thread-local socket, which is returned to the pool when the thread calls end_request() or dies.

class pymongo.pool.Request(connection)

A context manager returned by Connection.start_request(), so you can do with connection.start_request(): do_something() in Python 2.5+.

class pymongo.pool.SocketInfo(sock, pool)

Store a socket with some metadata

Previous topic

message – Tools for creating messages to be sent to MongoDB

Next topic

replica_set_connection – Tools for connecting to a MongoDB replica set

This Page