Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Python Samples for Cloud Bigtable

This directory contains samples for Cloud Bigtable, which may be used as a refererence for how to use this product. Samples, quickstarts, and other documentation are available at cloud.google.com.

Quickstart using HappyBase

Demonstrates of Cloud Bigtable using HappyBase. This sample creates a Bigtable client, connects to an instance and then to a table, then closes the connection.

Open in Cloud Shell

To run this sample:

  1. If this is your first time working with GCP products, you will need to set up [the Cloud SDK][cloud_sdk] or utilize [Google Cloud Shell][gcloud_shell]. This sample may [require authetication][authentication] and you will need to [enable billing][enable_billing].

  2. Make a fork of this repo and clone the branch locally, then navigate to the sample directory you want to use.

  3. Install the dependencies needed to run the samples.

     pip install -r requirements.txt
    
  4. Run the sample using

     python main.py
    
usage: main.py [-h] [--table TABLE] project_id instance_id
usage: main.py [-h] [--table TABLE] project_id instance_id


positional arguments:
  project_id     Your Cloud Platform project ID.
  instance_id    ID of the Cloud Bigtable instance to connect to.


optional arguments:
  -h, --help     show this help message and exit
  --table TABLE  Existing table used in the quickstart. (default: my-table)browse the source and [report issues][issues]. ### Contributing View the [contributing guidelines][contrib_guide], the [Python style guide][py_style] for more information. [authentication]: https://cloud.google.com/docs/authentication/getting-started [enable_billing]:https://cloud.google.com/apis/docs/getting-started#enabling_billing [client_library_python]: https://googlecloudplatform.github.io/google-cloud-python/ [issues]: https://github.com/GoogleCloudPlatform/google-cloud-python/issues [contrib_guide]: https://github.com/googleapis/google-cloud-python/blob/main/CONTRIBUTING.rst [py_style]: http://google.github.io/styleguide/pyguide.html [cloud_sdk]: https://cloud.google.com/sdk/docs [gcloud_shell]: https://cloud.google.com/shell/docs [gcloud_shell]: https://cloud.google.com/shell/docs