Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Num Expr Str ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareLt NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assign SubscriptStore NameLoad Index Str NameLoad If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryExcept body Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad With AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Yield NameLoad If NameLoad body Delete AttributeDel AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list AttributeLoad NameLoad attr decorator_list
N/A N/A Google Cloud Bigtable HappyBase pool module. N/A contextlib N/A threading N/A six gcloud.bigtable.happybase.connection Connection gcloud.bigtable.happybase.connection _get_cluster N/A _MIN_POOL_SIZE 1 N/A Minimum allowable size of a connection pool. NoConnectionsAvailable N/A RuntimeError N/A N/A Exception raised when no connections are available.

    This happens if a timeout was specified when obtaining a connection,
    and no connection became available within the specified timeout.
     N/A ConnectionPool N/A object N/A N/A Thread-safe connection pool.

    .. note::

        All keyword arguments are passed unmodified to the
        :class:`Connection <.happybase.connection.Connection>` constructor
        **except** for ``autoconnect``. This is because the ``open`` /
        ``closed`` status of a connection is managed by the pool. In addition,
        if ``cluster`` is not passed, the default / inferred cluster is
        determined by the pool and then passed to each
        :class:`Connection <.happybase.connection.Connection>` that is created.

    :type size: int
    :param size: The maximum number of concurrently open connections.

    :type kwargs: dict
    :param kwargs: Keyword arguments passed to
                   :class:`Connection <.happybase.Connection>`
                   constructor.

    :raises: :class:`TypeError <exceptions.TypeError>` if ``size``
             is non an integer.
             :class:`ValueError <exceptions.ValueError>` if ``size``
             is not positive.
     __init__ N/A N/A self size N/A kwargs N/A N/A N/A N/A isinstance size N/A six integer_types N/A N/A N/A TypeError Pool size arg must be an integer N/A N/A size _MIN_POOL_SIZE N/A N/A N/A ValueError Pool size must be positive N/A N/A self _lock N/A N/A threading Lock N/A N/A self _queue N/A N/A N/A N/A six moves queue LifoQueue maxsize size N/A N/A self _thread_connections N/A N/A threading local N/A connection_kwargs kwargs N/A N/A connection_kwargs N/A autoconnect False N/A N/A cluster connection_kwargs N/A N/A N/A connection_kwargs N/A cluster N/A _get_cluster timeout N/A N/A kwargs get timeout N/A _ N/A N/A N/A six moves range size N/A N/A connection N/A Connection connection_kwargs N/A N/A N/A N/A self _queue put connection N/A _acquire_connection N/A N/A self timeout N/A None N/A N/A Acquire a connection from the pool.

        :type timeout: int
        :param timeout: (Optional) Time (in seconds) to wait for a connection
                        to open.

        :rtype: :class:`Connection <.happybase.Connection>`
        :returns: An active connection from the queue stored on the pool.
        :raises: :class:`NoConnectionsAvailable` if ``Queue.get`` fails
                 before the ``timeout`` (only if a timeout is specified).
         N/A N/A N/A N/A N/A N/A self _queue get block True timeout timeout N/A N/A N/A N/A N/A N/A six moves queue Empty N/A N/A N/A NoConnectionsAvailable No connection available from pool within specified timeout N/A connection N/A N/A self timeout N/A None N/A N/A Obtain a connection from the pool.

        Must be used as a context manager, for example::

            with pool.connection() as connection:
                pass  # do something with the connection

        If ``timeout`` is omitted, this method waits forever for a connection
        to become available from the local queue.

        :type timeout: int
        :param timeout: (Optional) Time (in seconds) to wait for a connection
                        to open.

        :rtype: :class:`Connection <.happybase.connection.Connection>`
        :returns: An active connection from the pool.
        :raises: :class:`NoConnectionsAvailable` if no connection can be
                 retrieved from the pool before the ``timeout`` (only if
                 a timeout is specified).
         N/A connection N/A getattr N/A self _thread_connections current None N/A retrieved_new_cnxn False N/A N/A connection None N/A N/A retrieved_new_cnxn True N/A connection N/A N/A self _acquire_connection timeout N/A N/A self _lock N/A N/A N/A N/A self _thread_connections current connection N/A N/A N/A connection open N/A N/A connection N/A retrieved_new_cnxn N/A N/A N/A N/A self _thread_connections current N/A N/A N/A N/A self _queue put connection N/A N/A contextlib contextmanager N/A