Bigtable Data Client Async
class google.cloud.bigtable.data._async.client.BigtableDataClientAsync(*, project: str | None = None, pool_size: int = 3, credentials: google.auth.credentials.Credentials | None = None, client_options: dict [ str , Any] | 'google.api_core.client_options.ClientOptions' | None = None)
Bases: google.cloud.client.ClientWithProject
Create a client instance for the Bigtable Data API
Client should be created within an async context (running event loop)
-
Parameters
-
project– the project which the client acts on behalf of. If not passed, falls back to the default inferred from the environment.
-
pool_size– The number of grpc channels to maintain in the internal channel pool.
-
credentials– Thehe OAuth2 Credentials to use for this client. If not passed (and if no
_http
object is passed), falls back to the default inferred from the environment. -
client_options– Client options used to set user options on the client. API Endpoint should be set through client_options.
-
-
Raises
-
RuntimeError – if called outside of an async context (no running event loop)
-
ValueError – if pool_size is less than 1
-
async close(timeout: float = 2.0)
Cancel all background tasks
get_table(instance_id: str , table_id: str , *args, **kwargs)
Returns a table instance for making data API requests. All arguments are passed directly to the TableAsync constructor.
-
Parameters
-
instance_id– The Bigtable instance ID to associate with this client. instance_id is combined with the client’s project to fully specify the instance
-
table_id– The ID of the table. table_id is combined with the instance_id and the client’s project to fully specify the table
-
app_profile_id– The app profile to associate with requests. https://cloud.google.com/bigtable/docs/app-profiles
-
default_read_rows_operation_timeout– The default timeout for read rows operations, in seconds. If not set, defaults to 600 seconds (10 minutes)
-
default_read_rows_attempt_timeout– The default timeout for individual read rows rpc requests, in seconds. If not set, defaults to 20 seconds
-
default_mutate_rows_operation_timeout– The default timeout for mutate rows operations, in seconds. If not set, defaults to 600 seconds (10 minutes)
-
default_mutate_rows_attempt_timeout– The default timeout for individual mutate rows rpc requests, in seconds. If not set, defaults to 60 seconds
-
default_operation_timeout– The default timeout for all other operations, in seconds. If not set, defaults to 60 seconds
-
default_attempt_timeout– The default timeout for all other individual rpc requests, in seconds. If not set, defaults to 20 seconds
-
default_read_rows_retryable_errors– a list of errors that will be retried if encountered during read_rows and related operations. Defaults to 4 (DeadlineExceeded), 14 (ServiceUnavailable), and 10 (Aborted)
-
default_mutate_rows_retryable_errors– a list of errors that will be retried if encountered during mutate_rows and related operations. Defaults to 4 (DeadlineExceeded) and 14 (ServiceUnavailable)
-
default_retryable_errors– a list of errors that will be retried if encountered during all other operations. Defaults to 4 (DeadlineExceeded) and 14 (ServiceUnavailable)
-
-
Returns
a table instance for making data API requests
-
Return type
-
Raises
RuntimeError – if called outside of an async context (no running event loop)