Parent client for calling the Google Cloud Bigtable API.

This is the base from which all interactions with the API occur.

In the hierarchy of API concepts = ''#

Scope for interacting with the Cluster Admin and Table Admin APIs.

class, credentials=None, read_only=False, admin=False, user_agent='gcloud-python/0.20.0')[source]#


Client for interacting with Google Cloud Bigtable API.


Since the Cloud Bigtable API requires the gRPC transport, no http argument is accepted by this class.

  • project (str or unicode) – (Optional) The ID of the project which owns the instances, tables and data. If not provided, will attempt to determine from the environment.
  • credentials (OAuth2Credentials or NoneType) – (Optional) The OAuth2 Credentials to use for this client. If not provided, defaults to the Google Application Default Credentials.
  • read_only (bool) – (Optional) Boolean indicating if the data scope should be for reading only (or for writing as well). Defaults to False.
  • admin (bool) – (Optional) Boolean indicating if the client will be used to interact with the Instance Admin or Table Admin APIs. This requires the ADMIN_SCOPE. Defaults to False.
  • user_agent (str) – (Optional) The user agent to be used with API request. Defaults to DEFAULT_USER_AGENT.

ValueError if both read_only and admin are True


Make a copy of this client.

Copies the local data stored as simple types but does not copy the current state of any open connections with the Cloud Bigtable API.

Return type:Client
Returns:A copy of the current client.

Getter for client’s credentials.

Return type:OAuth2Credentials
Returns:The credentials stored on the client.
instance(instance_id, location='see-existing-cluster', display_name=None, serve_nodes=3)[source]#

Factory to create a instance associated with this client.

  • instance_id (str) – The ID of the instance.
  • location (string) – location name, in form projects/<project>/locations/<location>; used to set up the instance’s cluster.
  • display_name (str) – (Optional) The display name for the instance in the Cloud Console UI. (Must be between 4 and 30 characters.) If this value is not set in the constructor, will fall back to the instance ID.
  • serve_nodes (int) – (Optional) The number of nodes in the instance’s cluster; used to set up the instance’s cluster.
Return type:



an instance owned by this client.


List instances owned by the project.

Return type:tuple
Returns:A pair of results, the first is a list of Instance objects returned and the second is a list of strings (the failed locations in the request).

Project name to be used with Instance Admin API.


This property will not change if project does not, but the return value is not cached.

The project name is of the form

Return type:str
Returns:The project name to be used with the Cloud Bigtable Admin API RPC service. = ''#

Data API request host. = ''#

Scope for reading and writing table data. = ''#

Cluster Admin API request host. = ''#

Scope for reading table data. = ''#

Table Admin API request host.