Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .librarian/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ libraries:
# Allow release for google-crc32c once this bug is fixed.
- id: "google-crc32c"
release_blocked: true
# TODO(b/501132869): Disabling automatic releases until resolved.
- id: "google-cloud-bigtable"
release_blocked: true
# TODO(https://github.com/googleapis/google-cloud-python/issues/16962):
# Disable automatic releases until tests stabilize.
- id: "pandas-gbq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,24 @@ replacements:
\]
after: |
"protobuf >= 4.25.8, < 8.0.0",
"google-cloud-core >= 1.4.4, <3.0.0",
"grpc-google-iam-v1 >= 0.12.4, <1.0.0",
"google-crc32c>=1.5.0, <2.0.0dev",
"google-cloud-core >= 2.0.0, <3.0.0",
"grpc-google-iam-v1 >= 0.14.0, <1.0.0",
"google-crc32c>=1.6.0, <2.0.0dev",
]
count: 1
- paths: [
packages/google-cloud-bigtable/testing/constraints-3.10.txt,
]
before: |
google-api-core==2.17.1
google-auth==2.14.1
after: |
google-api-core==2.17.1
google-cloud-core==2.0.0
grpc-google-iam-v1==0.14.0
google-crc32c==1.6.0
google-auth==2.14.1
count: 1
- paths: [
packages/google-cloud-bigtable/google/cloud/bigtable_v2/services/bigtable/async_client.py,
packages/google-cloud-bigtable/google/cloud/bigtable_v2/services/bigtable/client.py,
Expand Down Expand Up @@ -408,13 +421,11 @@ replacements:
import nox

RUFF_VERSION = "ruff==0.14.14"
BLACK_VERSION = "black[jupyter]==23.7.0"
LINT_PATHS = ["google", "samples", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.14"

ALL_PYTHON = [
"3.9",
"3.10",
"3.11",
"3.12",
Expand All @@ -428,8 +439,7 @@ replacements:
"pytest",
"pytest-cov",
"pytest-asyncio",
BLACK_VERSION,
"autoflake",
RUFF_VERSION,
]
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
Expand All @@ -445,7 +455,7 @@ replacements:
]
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [
"pytest-asyncio==0.21.2",
BLACK_VERSION,
RUFF_VERSION,
"pyyaml==6.0.2",
]
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
Expand Down Expand Up @@ -607,9 +617,6 @@ replacements:
["python", "upb", "cpp"],
)
def unit(session, protobuf_implementation):
if session.python in ("3.7"):
session.skip("Python 3.7 is no longer supported")

# Install all test dependencies, then install this package in-place.
py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
Expand Down Expand Up @@ -944,8 +951,7 @@ replacements:
"""
Re-generate sync files for the library from CrossSync-annotated async source
"""
session.install(BLACK_VERSION)
session.install("autoflake")
session.install(RUFF_VERSION)
session.run("python", ".cross_sync/generate.py", ".")


Expand Down
2 changes: 0 additions & 2 deletions librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,6 @@ libraries:
apis:
- path: google/bigtable/v2
- path: google/bigtable/admin/v2
skip_generate: true
skip_release: true
python:
library_type: GAPIC_COMBO
opt_args_by_api:
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-bigtable/.flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
89 changes: 12 additions & 77 deletions packages/google-cloud-bigtable/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,16 @@
{
"name": "bigtable",
"name_pretty": "Google Cloud Bigtable",
"api_description": "is Google's NoSQL Big Data database service. It's the\nsame database that powers many core Google services, including Search,\nAnalytics, Maps, and Gmail.",
"product_documentation": "https://cloud.google.com/bigtable",
"api_description": "API for reading and writing the contents of Bigtable tables associated with\na Google Cloud project.",
"api_id": "bigtable.googleapis.com",
"api_shortname": "bigtable",
"client_documentation": "https://cloud.google.com/python/docs/reference/bigtable/latest",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559777",
"release_level": "stable",
"default_version": "v2",
"distribution_name": "google-cloud-bigtable",
"issue_tracker": "https://issuetracker.google.com/issues/new?component=187206\u0026template=0",
"language": "python",
"library_type": "GAPIC_COMBO",
"repo": "googleapis/google-cloud-python",
"distribution_name": "google-cloud-bigtable",
"api_id": "bigtable.googleapis.com",
"requires_billing": true,
"samples": [
{
"name": "Hello World in Cloud Bigtable",
"description": "Demonstrates how to connect to Cloud Bigtable and run some basic operations. More information available at: https://cloud.google.com/bigtable/docs/samples-python-hello",
"file": "main.py",
"runnable": true,
"custom_content": "<pre>usage: main.py [-h] [--table TABLE] project_id instance_id<br>Demonstrates how to connect to Cloud Bigtable and run some basic operations.<br>Prerequisites: - Create a Cloud Bigtable cluster.<br>https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google<br>Application Default Credentials.<br>https://developers.google.com/identity/protocols/application-default-<br>credentials<br><br><br>positional arguments:<br>&nbsp; project_id &nbsp; &nbsp; Your Cloud Platform project ID.<br>&nbsp; instance_id &nbsp; &nbsp;ID of the Cloud Bigtable instance to connect to.<br><br><br>optional arguments:<br>&nbsp; -h, --help &nbsp; &nbsp; show this help message and exit<br>&nbsp; --table TABLE &nbsp;Table to create and destroy. (default: Hello-Bigtable)</pre>",
"override_path": "hello"
},
{
"name": "Hello World using HappyBase",
"description": "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. More information available at: https://cloud.google.com/bigtable/docs/samples-python-hello-happybase",
"file": "main.py",
"runnable": true,
"custom_content": "<pre>usage: main.py [-h] [--table TABLE] project_id instance_id<br>Demonstrates how to connect to Cloud Bigtable and run some basic operations.<br>Prerequisites: - Create a Cloud Bigtable cluster.<br>https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google<br>Application Default Credentials.<br>https://developers.google.com/identity/protocols/application-default-<br>credentials<br><br><br>positional arguments:<br>&nbsp; project_id &nbsp; &nbsp; Your Cloud Platform project ID.<br>&nbsp; instance_id &nbsp; &nbsp;ID of the Cloud Bigtable instance to connect to.<br><br><br>optional arguments:<br>&nbsp; -h, --help &nbsp; &nbsp; show this help message and exit<br>&nbsp; --table TABLE &nbsp;Table to create and destroy. (default: Hello-Bigtable)</pre>",
"override_path": "hello_happybase"
},
{
"name": "cbt Command Demonstration",
"description": "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. More information about this quickstart is available at https://cloud.google.com/bigtable/docs/quickstart-cbt",
"file": "instanceadmin.py",
"runnable": true,
"custom_content": "<pre>usage: instanceadmin.py [-h] [run] [dev-instance] [del-instance] [add-cluster] [del-cluster] project_id instance_id cluster_id<br>Demonstrates how to connect to Cloud Bigtable and run some basic operations.<br>Prerequisites: - Create a Cloud Bigtable cluster.<br>https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google<br>Application Default Credentials.<br>https://developers.google.com/identity/protocols/application-default-<br>credentials<br><br><br>positional arguments:<br>&nbsp; project_id &nbsp; &nbsp; Your Cloud Platform project ID.<br>&nbsp; instance_id &nbsp; &nbsp;ID of the Cloud Bigtable instance to connect to.<br><br><br>optional arguments:<br>&nbsp; -h, --help &nbsp; &nbsp; show this help message and exit<br>&nbsp; --table TABLE &nbsp;Table to create and destroy. (default: Hello-Bigtable)</pre>",
"override_path": "instanceadmin"
},
{
"name": "Metric Scaler",
"description": "This sample demonstrates how to use Stackdriver Monitoring to scale Cloud Bigtable based on CPU usage.",
"file": "metricscaler.py",
"runnable": true,
"custom_content": "<pre>usage: metricscaler.py [-h] [--high_cpu_threshold HIGH_CPU_THRESHOLD] [--low_cpu_threshold LOW_CPU_THRESHOLD] [--short_sleep SHORT_SLEEP] [--long_sleep LONG_SLEEP] bigtable_instance bigtable_cluster<br>usage: metricscaler.py [-h] [--high_cpu_threshold HIGH_CPU_THRESHOLD] <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[--low_cpu_threshold LOW_CPU_THRESHOLD] <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[--short_sleep SHORT_SLEEP] [--long_sleep LONG_SLEEP] <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bigtable_instance bigtable_cluster <br><br> <br>Scales Cloud Bigtable clusters based on CPU usage. <br><br> <br>positional arguments: <br>&nbsp; bigtable_instance &nbsp; &nbsp; ID of the Cloud Bigtable instance to connect to. <br>&nbsp; bigtable_cluster &nbsp; &nbsp; &nbsp;ID of the Cloud Bigtable cluster to connect to. <br><br> <br>optional arguments: <br>&nbsp; -h, --help &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;show this help message and exit <br>&nbsp; --high_cpu_threshold HIGH_CPU_THRESHOLD <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Cloud Bigtable CPU usage is above this threshold, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scale up <br>&nbsp; --low_cpu_threshold LOW_CPU_THRESHOLD <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Cloud Bigtable CPU usage is below this threshold, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scale down <br>&nbsp; --short_sleep SHORT_SLEEP <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; How long to sleep in seconds between checking metrics <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; after no scale operation <br>&nbsp; --long_sleep LONG_SLEEP <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; How long to sleep in seconds between checking metrics <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; after a scaling operation</pre>",
"override_path": "metricscaler"
},
{
"name": "Quickstart",
"description": "Demonstrates of Cloud Bigtable. This sample creates a Bigtable client, connects to an instance and then to a table, then closes the connection.",
"file": "main.py",
"runnable": true,
"custom_content": "<pre>usage: main.py [-h] [--table TABLE] project_id instance_id <br><br> <br>positional arguments: <br>&nbsp; project_id &nbsp; &nbsp; Your Cloud Platform project ID. <br>&nbsp; instance_id &nbsp; &nbsp;ID of the Cloud Bigtable instance to connect to. <br><br> <br>optional arguments: <br>&nbsp; -h, --help &nbsp; &nbsp; show this help message and exit <br>&nbsp; --table TABLE &nbsp;Existing table used in the quickstart. (default: my-table)</pre>",
"override_path": "quickstart"
},
{
"name": "Quickstart using HappyBase",
"description": "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.",
"file": "main.py",
"runnable": true,
"custom_content": "<pre>usage: main.py [-h] [--table TABLE] project_id instance_id<br>usage: main.py [-h] [--table TABLE] project_id instance_id <br><br> <br>positional arguments: <br>&nbsp; project_id &nbsp; &nbsp; Your Cloud Platform project ID. <br>&nbsp; instance_id &nbsp; &nbsp;ID of the Cloud Bigtable instance to connect to. <br><br> <br>optional arguments: <br>&nbsp; -h, --help &nbsp; &nbsp; show this help message and exit <br>&nbsp; --table TABLE &nbsp;Existing table used in the quickstart. (default: my-table)</pre>",
"override_path": "quickstart_happybase"
},
{
"name": "Snippets",
"description": "This folder contains snippets for Python Cloud Bigtable.",
"override_path": "snippets"
},
{
"name": "Table Admin",
"description": "Demonstrates how to connect to Cloud Bigtable and run some basic operations.",
"file": "tableadmin.py",
"runnable": true,
"custom_content": "<pre>usage: tableadmin.py [-h] [run] [delete] [--table TABLE] project_id instance_id <br><br> <br>Demonstrates how to connect to Cloud Bigtable and run some basic operations. <br>Prerequisites: - Create a Cloud Bigtable cluster. <br>https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google <br>Application Default Credentials. <br>https://developers.google.com/identity/protocols/application-default- <br>credentials <br><br> <br>positional arguments: <br>&nbsp; project_id &nbsp; &nbsp; Your Cloud Platform project ID. <br>&nbsp; instance_id &nbsp; &nbsp;ID of the Cloud Bigtable instance to connect to. <br><br> <br>optional arguments: <br>&nbsp; -h, --help &nbsp; &nbsp; show this help message and exit <br>&nbsp; --table TABLE &nbsp;Table to create and destroy. (default: Hello-Bigtable)</pre>",
"override_path": "tableadmin"
}
],
"default_version": "v2",
"codeowner_team": "@googleapis/api-bigtable @googleapis/api-bigtable-partners",
"api_shortname": "bigtable"
}
"name": "bigtable",
"name_pretty": "Cloud Bigtable",
"product_documentation": "https://cloud.google.com/bigtable/docs",
"release_level": "stable",
"repo": "googleapis/google-cloud-python"
}
18 changes: 6 additions & 12 deletions packages/google-cloud-bigtable/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.
3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.9 -- -k <name of test>
$ nox -s system-3.12 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.9.
System tests are only configured to run under Python 3.12.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
Expand Down Expand Up @@ -195,11 +195,11 @@ configure them just like the System Tests.

# Run all tests in a folder
$ cd samples/snippets
$ nox -s py-3.8
$ nox -s py-3.14

# Run a single sample test
$ cd samples/snippets
$ nox -s py-3.8 -- -k <name of test>
$ nox -s py-3.14 -- -k <name of test>

********************************************
Note About ``README`` as it pertains to PyPI
Expand All @@ -221,18 +221,12 @@ Supported Python Versions

We support:

- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/
Expand All @@ -245,7 +239,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-bigtable/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.7.
We also explicitly decided to support Python 3 beginning with version 3.10.
Reasons for this include:

- Encouraging use of newest versions of Python 3
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-bigtable/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
26 changes: 13 additions & 13 deletions packages/google-cloud-bigtable/README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Python Client for Google Cloud Bigtable
=======================================
Python Client for Cloud Bigtable
================================

|stable| |pypi| |versions|

`Google Cloud Bigtable`_: is Google's NoSQL Big Data database service. It's the
same database that powers many core Google services, including Search,
Analytics, Maps, and Gmail.
`Cloud Bigtable`_: API for reading and writing the contents of Bigtable tables associated with
a Google Cloud project.

- `Client Library Documentation`_
- `Product Documentation`_
Expand All @@ -16,7 +15,7 @@ Analytics, Maps, and Gmail.
:target: https://pypi.org/project/google-cloud-bigtable/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-bigtable.svg
:target: https://pypi.org/project/google-cloud-bigtable/
.. _Google Cloud Bigtable: https://cloud.google.com/bigtable
.. _Cloud Bigtable: https://cloud.google.com/bigtable/docs
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/bigtable/latest/summary_overview
.. _Product Documentation: https://cloud.google.com/bigtable/docs

Expand Down Expand Up @@ -51,12 +50,12 @@ In order to use this library, you first need to go through the following steps:

1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Google Cloud Bigtable.`_
3. `Enable the Cloud Bigtable.`_
4. `Set up Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Google Cloud Bigtable.: https://cloud.google.com/bigtable
.. _Enable the Cloud Bigtable.: https://cloud.google.com/bigtable/docs
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

Installation
Expand Down Expand Up @@ -87,14 +86,15 @@ Supported Python Versions
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
Python.

Python >= 3.9, including 3.14
Python >= 3.10, including 3.14

.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.8
Python <= 3.9


If you are using an `end-of-life`_
version of Python, we recommend that you update as soon as possible to an actively supported version.
Expand Down Expand Up @@ -123,14 +123,14 @@ Windows
Next Steps
~~~~~~~~~~

- Read the `Client Library Documentation`_ for Google Cloud Bigtable
- Read the `Client Library Documentation`_ for Cloud Bigtable
to see other available methods on the client.
- Read the `Google Cloud Bigtable Product documentation`_ to learn
- Read the `Cloud Bigtable Product documentation`_ to learn
more about the product and see How-to Guides.
- View this `README`_ to see the full list of Cloud
APIs that we cover.

.. _Google Cloud Bigtable Product documentation: https://cloud.google.com/bigtable
.. _Cloud Bigtable Product documentation: https://cloud.google.com/bigtable/docs
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst

Logging
Expand Down
Loading
Loading