Skip to content

Commit 8241dcc

Browse files
committed
run librarian generate for google-cloud-bigtable
1 parent 01a3f29 commit 8241dcc

File tree

75 files changed

+964
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+964
-521
lines changed
Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
1-
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2020 Google LLC
4-
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
8-
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
181
[run]
192
branch = True
20-
omit =
21-
google/cloud/bigtable_admin/__init__.py
22-
google/cloud/bigtable_admin/gapic_version.py
233

244
[report]
25-
fail_under = 99
265
show_missing = True
6+
omit =
7+
google/cloud/bigtable/__init__.py
8+
google/cloud/bigtable/gapic_version.py
279
exclude_lines =
2810
# Re-enable the standard pragma
2911
pragma: NO COVER
3012
# Ignore debug-only repr
3113
def __repr__
32-
# Ignore abstract methods
33-
raise NotImplementedError
34-
omit =
35-
*/site-packages/*.py

packages/google-cloud-bigtable/.flake8

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
[flake8]
17+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
18+
# Resolve flake8 lint issues
1919
ignore = E203, E231, E266, E501, W503
2020
exclude =
21-
# Exclude generated code.
22-
**/proto/**
21+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
22+
# Ensure that generated code passes flake8 lint
2323
**/gapic/**
2424
**/services/**
2525
**/types/**
26+
# Exclude Protobuf gencode
2627
*_pb2.py
2728

2829
# Standard linting exemptions.

packages/google-cloud-bigtable/.repo-metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "bigtable",
3-
"name_pretty": "Cloud Bigtable",
3+
"name_pretty": "Google Cloud Bigtable",
4+
"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.",
45
"product_documentation": "https://cloud.google.com/bigtable",
56
"client_documentation": "https://cloud.google.com/python/docs/reference/bigtable/latest",
67
"issue_tracker": "https://issuetracker.google.com/savedsearches/559777",
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
include README.rst LICENSE
19-
recursive-include google *.json *.proto py.typed
17+
recursive-include google *.py *.pyi *.json *.proto py.typed
2018
recursive-include tests *
2119
global-exclude *.py[co]
2220
global-exclude __pycache__
23-
24-
# Exclude scripts for samples readmegen
25-
prune scripts/readme-gen
Lines changed: 135 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
Python Client for Google Cloud Bigtable
22
=======================================
33

4-
|GA| |pypi| |versions|
4+
|stable| |pypi| |versions|
55

6-
`Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's the
6+
`Google Cloud Bigtable`_: is Google's NoSQL Big Data database service. It's the
77
same database that powers many core Google services, including Search,
88
Analytics, Maps, and Gmail.
99

1010
- `Client Library Documentation`_
1111
- `Product Documentation`_
1212

13-
.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
14-
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
13+
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
14+
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
1515
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-bigtable.svg
1616
:target: https://pypi.org/project/google-cloud-bigtable/
1717
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-bigtable.svg
1818
:target: https://pypi.org/project/google-cloud-bigtable/
1919
.. _Google Cloud Bigtable: https://cloud.google.com/bigtable
20-
.. _Client Library Documentation: https://googleapis.dev/python/bigtable/latest
20+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/bigtable/latest/summary_overview
2121
.. _Product Documentation: https://cloud.google.com/bigtable/docs
2222

2323

@@ -51,70 +51,173 @@ In order to use this library, you first need to go through the following steps:
5151

5252
1. `Select or create a Cloud Platform project.`_
5353
2. `Enable billing for your project.`_
54-
3. `Enable the Cloud Bigtable API.`_
55-
4. `Setup Authentication.`_
54+
3. `Enable the Google Cloud Bigtable.`_
55+
4. `Set up Authentication.`_
5656

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

6262
Installation
6363
~~~~~~~~~~~~
6464

65-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
66-
create isolated Python environments. The basic problem it addresses is one of
67-
dependencies and versions, and indirectly permissions.
65+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
66+
creates isolated Python environments. These isolated environments can have separate
67+
versions of Python packages, which allows you to isolate one project's dependencies
68+
from the dependencies of other projects.
6869

69-
With `virtualenv`_, it's possible to install this library without needing system
70+
With `venv`_, it's possible to install this library without needing system
7071
install permissions, and without clashing with the installed system
7172
dependencies.
7273

73-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
74+
.. _`venv`: https://docs.python.org/3/library/venv.html
75+
76+
77+
Code samples and snippets
78+
~~~~~~~~~~~~~~~~~~~~~~~~~
79+
80+
Code samples and snippets live in the `samples/`_ folder.
81+
82+
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-bigtable/samples
7483

7584

7685
Supported Python Versions
7786
^^^^^^^^^^^^^^^^^^^^^^^^^
87+
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
88+
Python.
7889

79-
Python >= 3.7
90+
Python >= 3.9, including 3.14
8091

81-
Deprecated Python Versions
82-
^^^^^^^^^^^^^^^^^^^^^^^^^^
92+
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
93+
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
8394

84-
- Python 2.7: the last released version which supported Python 2.7 was
85-
version 1.7.0, released 2021-02-09.
95+
Unsupported Python Versions
96+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
97+
Python <= 3.8
8698

87-
- Python 3.5: the last released version which supported Python 3.5 was
88-
version 1.7.0, released 2021-02-09.
99+
If you are using an `end-of-life`_
100+
version of Python, we recommend that you update as soon as possible to an actively supported version.
89101

90-
- Python 3.6: the last released version which supported Python 3.6 was
91-
version v2.10.1, released 2022-06-03.
102+
.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
92103

93104
Mac/Linux
94105
^^^^^^^^^
95106

96107
.. code-block:: console
97108
98-
pip install virtualenv
99-
virtualenv <your-env>
109+
python3 -m venv <your-env>
100110
source <your-env>/bin/activate
101-
<your-env>/bin/pip install google-cloud-bigtable
111+
pip install google-cloud-bigtable
102112
103113
104114
Windows
105115
^^^^^^^
106116

107117
.. code-block:: console
108118
109-
pip install virtualenv
110-
virtualenv <your-env>
111-
<your-env>\Scripts\activate
112-
<your-env>\Scripts\pip.exe install google-cloud-bigtable
119+
py -m venv <your-env>
120+
.\<your-env>\Scripts\activate
121+
pip install google-cloud-bigtable
113122
114123
Next Steps
115124
~~~~~~~~~~
116125

117-
- Read the `Client Library Documentation`_ for Cloud Bigtable API
126+
- Read the `Client Library Documentation`_ for Google Cloud Bigtable
118127
to see other available methods on the client.
119-
- Read the `Product documentation`_ to learn
128+
- Read the `Google Cloud Bigtable Product documentation`_ to learn
120129
more about the product and see How-to Guides.
130+
- View this `README`_ to see the full list of Cloud
131+
APIs that we cover.
132+
133+
.. _Google Cloud Bigtable Product documentation: https://cloud.google.com/bigtable
134+
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
135+
136+
Logging
137+
-------
138+
139+
This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
140+
Note the following:
141+
142+
#. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging.
143+
#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**.
144+
#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
145+
146+
Simple, environment-based configuration
147+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148+
149+
To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google
150+
logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged
151+
messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
152+
event.
153+
154+
A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
155+
156+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
157+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
158+
159+
**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
160+
161+
Environment-Based Examples
162+
^^^^^^^^^^^^^^^^^^^^^^^^^^
163+
164+
- Enabling the default handler for all Google-based loggers
165+
166+
.. code-block:: console
167+
168+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
169+
170+
- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
171+
172+
.. code-block:: console
173+
174+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
175+
176+
177+
Advanced, code-based configuration
178+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179+
180+
You can also configure a valid logging scope using Python's standard `logging` mechanism.
181+
182+
Code-Based Examples
183+
^^^^^^^^^^^^^^^^^^^
184+
185+
- Configuring a handler for all Google-based loggers
186+
187+
.. code-block:: python
188+
189+
import logging
190+
191+
from google.cloud import library_v1
192+
193+
base_logger = logging.getLogger("google")
194+
base_logger.addHandler(logging.StreamHandler())
195+
base_logger.setLevel(logging.DEBUG)
196+
197+
- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
198+
199+
.. code-block:: python
200+
201+
import logging
202+
203+
from google.cloud import library_v1
204+
205+
base_logger = logging.getLogger("google.cloud.library_v1")
206+
base_logger.addHandler(logging.StreamHandler())
207+
base_logger.setLevel(logging.DEBUG)
208+
209+
Logging details
210+
~~~~~~~~~~~~~~~
211+
212+
#. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root
213+
logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
214+
:code:`logging.getLogger("google").propagate = True` in your code.
215+
#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
216+
one library, but decide you need to also set up environment-based logging configuration for another library.
217+
218+
#. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
219+
if the code -based configuration gets applied first.
220+
221+
#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
222+
executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
223+
(This is the reason for 2.i. above.)

packages/google-cloud-bigtable/docs/README.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)