This directory contains samples for Cloud Bigtable, which may be used as a refererence for how to use Cloud Bigtable. Samples, quickstarts, and other documentation are available at cloud.google.com.
A 'Hello World' demonstration using Cloud Bigtable.
To run this sample:
-
If this is your first time working with GCP products, you will need to set up the Cloud SDK or utilize Google Cloud Shell. This sample may require authetication and you will need to enable billing.
-
Make a fork of this repo and clone the branch locally, then navigate to the sample directory you want to use.
-
Install the dependencies needed to run the samples.
pip install -r requirements.txt -
Run the sample using
python main.py
A 'Hello World' demonstration using Cloud Bigtable. This sample demonstrates using the Google Cloud Client Library HappyBase package, an implementation of the HappyBase API to connect to and interact with Cloud Bigtable.
To run this sample:
-
If this is your first time working with GCP products, you will need to set up the Cloud SDK or utilize Google Cloud Shell. This sample may require authetication and you will need to enable billing.
-
Make a fork of this repo and clone the branch locally, then navigate to the sample directory you want to use.
-
Install the dependencies needed to run the samples.
pip install -r requirements.txt -
Run the sample using
python main.py
This page explains how to use the cbt command to connect to a Cloud Bigtable instance, perform basic administrative tasks, and read and write data in a table.
To run this sample:
-
If this is your first time working with GCP products, you will need to set up the Cloud SDK or utilize Google Cloud Shell. This sample may require authetication and you will need to enable billing.
-
Make a fork of this repo and clone the branch locally, then navigate to the sample directory you want to use.
-
Install the dependencies needed to run the samples.
pip install -r requirements.txt -
Run the sample using
python instanceadmin.py
Demonstrates how to connect to Cloud Bigtable and run some basic operations to create instance, create cluster, delete instance and delete cluster.
This sample demonstrates how to use Stackdriver Monitoring to scale Cloud Bigtable based on CPU usage.
To run this sample:
-
If this is your first time working with GCP products, you will need to set up the Cloud SDK or utilize Google Cloud Shell. This sample may require authetication and you will need to enable billing.
-
Make a fork of this repo and clone the branch locally, then navigate to the sample directory you want to use.
-
Install the dependencies needed to run the samples.
pip install -r requirements.txt -
Run the sample using
python metricscaler.py
Scales Cloud Bigtable clusters based on CPU usage.
The Cloud Bigtable quickstart.
The Cloud Bigtable quickstart using Happybase API.
Snippets for Cloud Bigtable.
Demonstrates how to connect to Cloud Bigtable and run some basic operations.
To run this sample:
-
If this is your first time working with GCP products, you will need to set up the Cloud SDK or utilize Google Cloud Shell. This sample may require authetication and you will need to enable billing.
-
Make a fork of this repo and clone the branch locally, then navigate to the sample directory you want to use.
-
Install the dependencies needed to run the samples.
pip install -r requirements.txt -
Run the sample using
python tableadmin.py
Remember to create a Cloud Bigtable cluster and set your Google Application Default Credentials before running this sample.
These samples use the Google Cloud Client Library for Python. You can read the documentation for more details on API usage and use GitHub to browse the source and report issues.
For contributing guidelines, the Python style guide, and more information on prerequisite steps to contribute, view the source code at googleapis/python-bigtable.