To use the API, theClientclass defines a high-level interface which handles authorization
and creating other objects:
from google.cloud.bigtable.client import Client
client = Client()
Long-lived Defaults
When creating aClient, theuser_agentargument has sensible a default
(DEFAULT_USER_AGENT).
However, you may over-ride it and the value will be used throughout all API
requests made with theclientyou create.
Configuration
For an overview of authentication ingoogle-cloud-python,
seeAuthentication.
In addition to any authentication configuration, you can also set theGOOGLE_CLOUD_PROJECTenvironment variable for the Google Cloud Console
project you’d like to interact with. If your code is running in Google App
Engine or Google Compute Engine the project will be detected automatically.
(Setting this environment variable is not required, you may instead pass theprojectexplicitly when constructing aClient).
After configuring your environment, create aClient
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [2.32.0 (latest)](/python/docs/reference/bigtable/latest/client-intro)\n- [2.31.0](/python/docs/reference/bigtable/2.31.0/client-intro)\n- [2.30.1](/python/docs/reference/bigtable/2.30.1/client-intro)\n- [2.29.0](/python/docs/reference/bigtable/2.29.0/client-intro)\n- [2.28.1](/python/docs/reference/bigtable/2.28.1/client-intro)\n- [2.26.0](/python/docs/reference/bigtable/2.26.0/client-intro)\n- [2.25.0](/python/docs/reference/bigtable/2.25.0/client-intro)\n- [2.24.0](/python/docs/reference/bigtable/2.24.0/client-intro)\n- [2.23.1](/python/docs/reference/bigtable/2.23.1/client-intro)\n- [2.22.0](/python/docs/reference/bigtable/2.22.0/client-intro)\n- [2.21.0](/python/docs/reference/bigtable/2.21.0/client-intro)\n- [2.20.0](/python/docs/reference/bigtable/2.20.0/client-intro)\n- [2.19.0](/python/docs/reference/bigtable/2.19.0/client-intro)\n- [2.18.1](/python/docs/reference/bigtable/2.18.1/client-intro)\n- [2.17.0](/python/docs/reference/bigtable/2.17.0/client-intro)\n- [2.16.0](/python/docs/reference/bigtable/2.16.0/client-intro)\n- [2.15.0](/python/docs/reference/bigtable/2.15.0/client-intro)\n- [2.14.1](/python/docs/reference/bigtable/2.14.1/client-intro)\n- [2.13.2](/python/docs/reference/bigtable/2.13.2/client-intro)\n- [2.12.0](/python/docs/reference/bigtable/2.12.0/client-intro)\n- [2.11.3](/python/docs/reference/bigtable/2.11.3/client-intro)\n- [2.10.1](/python/docs/reference/bigtable/2.10.1/client-intro)\n- [2.9.0](/python/docs/reference/bigtable/2.9.0/client-intro)\n- [2.8.1](/python/docs/reference/bigtable/2.8.1/client-intro)\n- [2.7.1](/python/docs/reference/bigtable/2.7.1/client-intro)\n- [2.6.0](/python/docs/reference/bigtable/2.6.0/client-intro)\n- [2.5.2](/python/docs/reference/bigtable/2.5.2/client-intro)\n- [2.4.0](/python/docs/reference/bigtable/2.4.0/client-intro)\n- [2.3.3](/python/docs/reference/bigtable/2.3.3/client-intro)\n- [2.2.0](/python/docs/reference/bigtable/2.2.0/client-intro)\n- [2.1.0](/python/docs/reference/bigtable/2.1.0/client-intro)\n- [2.0.0](/python/docs/reference/bigtable/2.0.0/client-intro)\n- [1.7.3](/python/docs/reference/bigtable/1.7.3/client-intro)\n- [1.6.1](/python/docs/reference/bigtable/1.6.1/client-intro)\n- [1.5.1](/python/docs/reference/bigtable/1.5.1/client-intro)\n- [1.4.0](/python/docs/reference/bigtable/1.4.0/client-intro)\n- [1.3.0](/python/docs/reference/bigtable/1.3.0/client-intro)\n- [1.2.1](/python/docs/reference/bigtable/1.2.1/client-intro)\n- [1.1.0](/python/docs/reference/bigtable/1.1.0/client-intro)\n- [1.0.0](/python/docs/reference/bigtable/1.0.0/client-intro)\n- [0.34.0](/python/docs/reference/bigtable/0.34.0/client-intro) \n\nBase for Everything\n===================\n\nTo use the API, the [`Client`](/python/docs/reference/bigtable/latest/client#google.cloud.bigtable.client.Client)\nclass defines a high-level interface which handles authorization\nand creating other objects: \n\n from google.cloud.bigtable.client import Client\n client = Client()\n\nLong-lived Defaults\n-------------------\n\nWhen creating a [`Client`](/python/docs/reference/bigtable/latest/client#google.cloud.bigtable.client.Client), the\n`user_agent` argument has sensible a default\n(`DEFAULT_USER_AGENT`).\nHowever, you may over-ride it and the value will be used throughout all API\nrequests made with the `client` you create.\n\nConfiguration\n-------------\n\n- For an overview of authentication in `google-cloud-python`,\n see [Authentication](https://googleapis.dev/python/google-api-core/latest/auth.html#authentication).\n\n- In addition to any authentication configuration, you can also set the\n `GOOGLE_CLOUD_PROJECT` environment variable for the Google Cloud Console\n project you'd like to interact with. If your code is running in Google App\n Engine or Google Compute Engine the project will be detected automatically.\n (Setting this environment variable is not required, you may instead pass the\n `project` explicitly when constructing a\n `Client`).\n\n- After configuring your environment, create a\n `Client`\n\n \u003e\u003e\u003e from google.cloud import https://cloud.google.com/python/docs/reference/bigtable/latest/\n \u003e\u003e\u003e client = https://cloud.google.com/python/docs/reference/bigtable/latest/.https://cloud.google.com/python/docs/reference/bigtable/latest/google.cloud.bigtable.client.Client.html()\n\nor pass in `credentials` and `project` explicitly \n\n \u003e\u003e\u003e from google.cloud import https://cloud.google.com/python/docs/reference/bigtable/latest/\n \u003e\u003e\u003e client = https://cloud.google.com/python/docs/reference/bigtable/latest/.https://cloud.google.com/python/docs/reference/bigtable/latest/google.cloud.bigtable.client.Client.html(project='my-project', credentials=creds)\n\nAdmin API Access\n----------------\n\nIf you'll be using your client to make [Instance Admin](https://github.com/googleapis/python-bigtable/blob/main/google/cloud/bigtable_admin_v2/proto/bigtable_instance_admin.proto) and [Table Admin](https://github.com/googleapis/python-bigtable/blob/main/google/cloud/bigtable_admin_v2/proto/bigtable_table_admin.proto)\nAPI requests, you'll need to pass the `admin` argument: \n\n client = bigtable.Client(admin=True)\n\nRead-Only Mode\n--------------\n\nIf, on the other hand, you only have (or want) read access to the data,\nyou can pass the `read_only` argument: \n\n client = bigtable.Client(read_only=True)\n\nThis will ensure that the\n[`READ_ONLY_SCOPE`](/python/docs/reference/bigtable/latest/client#google.cloud.bigtable.client.READ_ONLY_SCOPE) is used\nfor API requests (so any accidental requests that would modify data will\nfail).\n\nNext Step\n---------\n\nAfter a [`Client`](/python/docs/reference/bigtable/latest/client#google.cloud.bigtable.client.Client), the next highest-level\nobject is an [`Instance`](/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance). You'll need\none before you can interact with tables or data.\n\nHead next to learn about the [Instance Admin API](/python/docs/reference/bigtable/latest/instance-api)."]]