google-cloud-container 2.21.0__tar.gz → 2.63.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. google_cloud_container-2.63.0/MANIFEST.in +20 -0
  2. google_cloud_container-2.63.0/PKG-INFO +242 -0
  3. google_cloud_container-2.63.0/README.rst +197 -0
  4. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container/__init__.py +119 -1
  5. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container/gapic_version.py +2 -2
  6. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/__init__.py +223 -1
  7. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/gapic_metadata.json +215 -0
  8. {google-cloud-container-2.21.0/google/cloud/container_v1beta1 → google_cloud_container-2.63.0/google/cloud/container_v1}/gapic_version.py +2 -2
  9. {google-cloud-container-2.21.0/google/cloud/container_v1beta1 → google_cloud_container-2.63.0/google/cloud/container_v1}/services/__init__.py +1 -1
  10. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/services/cluster_manager/__init__.py +1 -1
  11. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/services/cluster_manager/async_client.py +1143 -549
  12. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/services/cluster_manager/client.py +1237 -380
  13. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/services/cluster_manager/pagers.py +51 -9
  14. {google-cloud-container-2.21.0/google/cloud/container_v1beta1 → google_cloud_container-2.63.0/google/cloud/container_v1}/services/cluster_manager/transports/__init__.py +5 -1
  15. {google-cloud-container-2.21.0/google/cloud/container_v1beta1 → google_cloud_container-2.63.0/google/cloud/container_v1}/services/cluster_manager/transports/base.py +67 -39
  16. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +243 -54
  17. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +532 -54
  18. google_cloud_container-2.63.0/google/cloud/container_v1/services/cluster_manager/transports/rest.py +7988 -0
  19. google_cloud_container-2.63.0/google/cloud/container_v1/services/cluster_manager/transports/rest_base.py +1898 -0
  20. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/types/__init__.py +119 -1
  21. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/types/cluster_service.py +5831 -416
  22. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/__init__.py +239 -1
  23. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/gapic_metadata.json +40 -0
  24. {google-cloud-container-2.21.0/google/cloud/container_v1 → google_cloud_container-2.63.0/google/cloud/container_v1beta1}/gapic_version.py +2 -2
  25. {google-cloud-container-2.21.0/tests → google_cloud_container-2.63.0/google/cloud/container_v1beta1/services}/__init__.py +1 -1
  26. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/services/cluster_manager/__init__.py +1 -1
  27. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +1420 -889
  28. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/services/cluster_manager/client.py +1493 -684
  29. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/services/cluster_manager/pagers.py +51 -9
  30. {google-cloud-container-2.21.0/google/cloud/container_v1 → google_cloud_container-2.63.0/google/cloud/container_v1beta1}/services/cluster_manager/transports/__init__.py +1 -1
  31. {google-cloud-container-2.21.0/google/cloud/container_v1 → google_cloud_container-2.63.0/google/cloud/container_v1beta1}/services/cluster_manager/transports/base.py +127 -11
  32. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +276 -55
  33. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +596 -55
  34. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/types/__init__.py +135 -1
  35. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/types/cluster_service.py +6582 -604
  36. google_cloud_container-2.63.0/google_cloud_container.egg-info/PKG-INFO +242 -0
  37. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google_cloud_container.egg-info/SOURCES.txt +4 -3
  38. google_cloud_container-2.63.0/google_cloud_container.egg-info/requires.txt +11 -0
  39. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/setup.cfg +0 -3
  40. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/setup.py +23 -13
  41. {google-cloud-container-2.21.0/tests/unit → google_cloud_container-2.63.0/tests}/__init__.py +1 -1
  42. google_cloud_container-2.63.0/tests/system/__init__.py +15 -0
  43. google_cloud_container-2.63.0/tests/system/smoke_test.py +40 -0
  44. {google-cloud-container-2.21.0/google/cloud/container_v1/services → google_cloud_container-2.63.0/tests/unit}/__init__.py +1 -1
  45. google_cloud_container-2.63.0/tests/unit/gapic/__init__.py +15 -0
  46. google_cloud_container-2.63.0/tests/unit/gapic/container_v1/__init__.py +15 -0
  47. google_cloud_container-2.63.0/tests/unit/gapic/container_v1/test_cluster_manager.py +28739 -0
  48. google_cloud_container-2.63.0/tests/unit/gapic/container_v1beta1/__init__.py +15 -0
  49. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +8306 -674
  50. google-cloud-container-2.21.0/MANIFEST.in +0 -25
  51. google-cloud-container-2.21.0/PKG-INFO +0 -131
  52. google-cloud-container-2.21.0/README.rst +0 -107
  53. google-cloud-container-2.21.0/google_cloud_container.egg-info/PKG-INFO +0 -131
  54. google-cloud-container-2.21.0/google_cloud_container.egg-info/namespace_packages.txt +0 -2
  55. google-cloud-container-2.21.0/google_cloud_container.egg-info/requires.txt +0 -6
  56. google-cloud-container-2.21.0/tests/system/gapic/v1/test_system_cluster_manager_v1.py +0 -28
  57. google-cloud-container-2.21.0/tests/unit/gapic/__init__.py +0 -15
  58. google-cloud-container-2.21.0/tests/unit/gapic/container_v1/__init__.py +0 -15
  59. google-cloud-container-2.21.0/tests/unit/gapic/container_v1/test_cluster_manager.py +0 -10673
  60. google-cloud-container-2.21.0/tests/unit/gapic/container_v1beta1/__init__.py +0 -15
  61. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/LICENSE +0 -0
  62. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container/py.typed +0 -0
  63. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1/py.typed +0 -0
  64. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google/cloud/container_v1beta1/py.typed +0 -0
  65. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google_cloud_container.egg-info/dependency_links.txt +0 -0
  66. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google_cloud_container.egg-info/not-zip-safe +0 -0
  67. {google-cloud-container-2.21.0 → google_cloud_container-2.63.0}/google_cloud_container.egg-info/top_level.txt +0 -0
@@ -0,0 +1,20 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ include README.rst LICENSE
17
+ recursive-include google *.py *.pyi *.json *.proto py.typed
18
+ recursive-include tests *
19
+ global-exclude *.py[co]
20
+ global-exclude __pycache__
@@ -0,0 +1,242 @@
1
+ Metadata-Version: 2.4
2
+ Name: google-cloud-container
3
+ Version: 2.63.0
4
+ Summary: Google Cloud Container API client library
5
+ Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-container
6
+ Author: Google LLC
7
+ Author-email: googleapis-packages@google.com
8
+ License: Apache 2.0
9
+ Platform: Posix; MacOS X; Windows
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Operating System :: OS Independent
24
+ Classifier: Topic :: Internet
25
+ Requires-Python: >=3.7
26
+ License-File: LICENSE
27
+ Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0,>=1.34.1
28
+ Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
29
+ Requires-Dist: grpcio<2.0.0,>=1.33.2
30
+ Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
31
+ Requires-Dist: proto-plus<2.0.0,>=1.22.3
32
+ Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
33
+ Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<7.0.0,>=3.20.2
34
+ Dynamic: author
35
+ Dynamic: author-email
36
+ Dynamic: classifier
37
+ Dynamic: description
38
+ Dynamic: home-page
39
+ Dynamic: license
40
+ Dynamic: license-file
41
+ Dynamic: platform
42
+ Dynamic: requires-dist
43
+ Dynamic: requires-python
44
+ Dynamic: summary
45
+
46
+ Python Client for Kubernetes Engine
47
+ ===================================
48
+
49
+ |stable| |pypi| |versions|
50
+
51
+ `Kubernetes Engine`_: The Google Kubernetes Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.
52
+
53
+ - `Client Library Documentation`_
54
+ - `Product Documentation`_
55
+
56
+ .. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
57
+ :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
58
+ .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-container.svg
59
+ :target: https://pypi.org/project/google-cloud-container/
60
+ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-container.svg
61
+ :target: https://pypi.org/project/google-cloud-container/
62
+ .. _Kubernetes Engine: https://cloud.google.com/kubernetes-engine/
63
+ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/container/latest/summary_overview
64
+ .. _Product Documentation: https://cloud.google.com/kubernetes-engine/
65
+
66
+ Quick Start
67
+ -----------
68
+
69
+ In order to use this library, you first need to go through the following steps:
70
+
71
+ 1. `Select or create a Cloud Platform project.`_
72
+ 2. `Enable billing for your project.`_
73
+ 3. `Enable the Kubernetes Engine.`_
74
+ 4. `Set up Authentication.`_
75
+
76
+ .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
77
+ .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
78
+ .. _Enable the Kubernetes Engine.: https://cloud.google.com/kubernetes-engine/
79
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
80
+
81
+ Installation
82
+ ~~~~~~~~~~~~
83
+
84
+ Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
85
+ creates isolated Python environments. These isolated environments can have separate
86
+ versions of Python packages, which allows you to isolate one project's dependencies
87
+ from the dependencies of other projects.
88
+
89
+ With `venv`_, it's possible to install this library without needing system
90
+ install permissions, and without clashing with the installed system
91
+ dependencies.
92
+
93
+ .. _`venv`: https://docs.python.org/3/library/venv.html
94
+
95
+
96
+ Code samples and snippets
97
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
98
+
99
+ Code samples and snippets live in the `samples/`_ folder.
100
+
101
+ .. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-container/samples
102
+
103
+
104
+ Supported Python Versions
105
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
106
+ Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
107
+ Python.
108
+
109
+ Python >= 3.7, including 3.14
110
+
111
+ .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
112
+ .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
113
+
114
+ Unsupported Python Versions
115
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
+ Python <= 3.6
117
+
118
+ If you are using an `end-of-life`_
119
+ version of Python, we recommend that you update as soon as possible to an actively supported version.
120
+
121
+ .. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
122
+
123
+ Mac/Linux
124
+ ^^^^^^^^^
125
+
126
+ .. code-block:: console
127
+
128
+ python3 -m venv <your-env>
129
+ source <your-env>/bin/activate
130
+ pip install google-cloud-container
131
+
132
+
133
+ Windows
134
+ ^^^^^^^
135
+
136
+ .. code-block:: console
137
+
138
+ py -m venv <your-env>
139
+ .\<your-env>\Scripts\activate
140
+ pip install google-cloud-container
141
+
142
+ Next Steps
143
+ ~~~~~~~~~~
144
+
145
+ - Read the `Client Library Documentation`_ for Kubernetes Engine
146
+ to see other available methods on the client.
147
+ - Read the `Kubernetes Engine Product documentation`_ to learn
148
+ more about the product and see How-to Guides.
149
+ - View this `README`_ to see the full list of Cloud
150
+ APIs that we cover.
151
+
152
+ .. _Kubernetes Engine Product documentation: https://cloud.google.com/kubernetes-engine/
153
+ .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
154
+
155
+ Logging
156
+ -------
157
+
158
+ This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
159
+ Note the following:
160
+
161
+ #. 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.
162
+ #. 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**.
163
+ #. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
164
+
165
+ Simple, environment-based configuration
166
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167
+
168
+ 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
169
+ 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
170
+ messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
171
+ event.
172
+
173
+ A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
174
+
175
+ - Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
176
+ - Invalid logging scopes: :code:`foo`, :code:`123`, etc.
177
+
178
+ **NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
179
+
180
+ Environment-Based Examples
181
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
182
+
183
+ - Enabling the default handler for all Google-based loggers
184
+
185
+ .. code-block:: console
186
+
187
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
188
+
189
+ - Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
190
+
191
+ .. code-block:: console
192
+
193
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
194
+
195
+
196
+ Advanced, code-based configuration
197
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
198
+
199
+ You can also configure a valid logging scope using Python's standard `logging` mechanism.
200
+
201
+ Code-Based Examples
202
+ ^^^^^^^^^^^^^^^^^^^
203
+
204
+ - Configuring a handler for all Google-based loggers
205
+
206
+ .. code-block:: python
207
+
208
+ import logging
209
+
210
+ from google.cloud import library_v1
211
+
212
+ base_logger = logging.getLogger("google")
213
+ base_logger.addHandler(logging.StreamHandler())
214
+ base_logger.setLevel(logging.DEBUG)
215
+
216
+ - Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
217
+
218
+ .. code-block:: python
219
+
220
+ import logging
221
+
222
+ from google.cloud import library_v1
223
+
224
+ base_logger = logging.getLogger("google.cloud.library_v1")
225
+ base_logger.addHandler(logging.StreamHandler())
226
+ base_logger.setLevel(logging.DEBUG)
227
+
228
+ Logging details
229
+ ~~~~~~~~~~~~~~~
230
+
231
+ #. 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
232
+ logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
233
+ :code:`logging.getLogger("google").propagate = True` in your code.
234
+ #. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
235
+ one library, but decide you need to also set up environment-based logging configuration for another library.
236
+
237
+ #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
238
+ if the code -based configuration gets applied first.
239
+
240
+ #. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
241
+ executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
242
+ (This is the reason for 2.i. above.)
@@ -0,0 +1,197 @@
1
+ Python Client for Kubernetes Engine
2
+ ===================================
3
+
4
+ |stable| |pypi| |versions|
5
+
6
+ `Kubernetes Engine`_: The Google Kubernetes Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.
7
+
8
+ - `Client Library Documentation`_
9
+ - `Product Documentation`_
10
+
11
+ .. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
12
+ :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
13
+ .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-container.svg
14
+ :target: https://pypi.org/project/google-cloud-container/
15
+ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-container.svg
16
+ :target: https://pypi.org/project/google-cloud-container/
17
+ .. _Kubernetes Engine: https://cloud.google.com/kubernetes-engine/
18
+ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/container/latest/summary_overview
19
+ .. _Product Documentation: https://cloud.google.com/kubernetes-engine/
20
+
21
+ Quick Start
22
+ -----------
23
+
24
+ In order to use this library, you first need to go through the following steps:
25
+
26
+ 1. `Select or create a Cloud Platform project.`_
27
+ 2. `Enable billing for your project.`_
28
+ 3. `Enable the Kubernetes Engine.`_
29
+ 4. `Set up Authentication.`_
30
+
31
+ .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
32
+ .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33
+ .. _Enable the Kubernetes Engine.: https://cloud.google.com/kubernetes-engine/
34
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
35
+
36
+ Installation
37
+ ~~~~~~~~~~~~
38
+
39
+ Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
40
+ creates isolated Python environments. These isolated environments can have separate
41
+ versions of Python packages, which allows you to isolate one project's dependencies
42
+ from the dependencies of other projects.
43
+
44
+ With `venv`_, it's possible to install this library without needing system
45
+ install permissions, and without clashing with the installed system
46
+ dependencies.
47
+
48
+ .. _`venv`: https://docs.python.org/3/library/venv.html
49
+
50
+
51
+ Code samples and snippets
52
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
53
+
54
+ Code samples and snippets live in the `samples/`_ folder.
55
+
56
+ .. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-container/samples
57
+
58
+
59
+ Supported Python Versions
60
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
61
+ Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
62
+ Python.
63
+
64
+ Python >= 3.7, including 3.14
65
+
66
+ .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
67
+ .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
68
+
69
+ Unsupported Python Versions
70
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
+ Python <= 3.6
72
+
73
+ If you are using an `end-of-life`_
74
+ version of Python, we recommend that you update as soon as possible to an actively supported version.
75
+
76
+ .. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
77
+
78
+ Mac/Linux
79
+ ^^^^^^^^^
80
+
81
+ .. code-block:: console
82
+
83
+ python3 -m venv <your-env>
84
+ source <your-env>/bin/activate
85
+ pip install google-cloud-container
86
+
87
+
88
+ Windows
89
+ ^^^^^^^
90
+
91
+ .. code-block:: console
92
+
93
+ py -m venv <your-env>
94
+ .\<your-env>\Scripts\activate
95
+ pip install google-cloud-container
96
+
97
+ Next Steps
98
+ ~~~~~~~~~~
99
+
100
+ - Read the `Client Library Documentation`_ for Kubernetes Engine
101
+ to see other available methods on the client.
102
+ - Read the `Kubernetes Engine Product documentation`_ to learn
103
+ more about the product and see How-to Guides.
104
+ - View this `README`_ to see the full list of Cloud
105
+ APIs that we cover.
106
+
107
+ .. _Kubernetes Engine Product documentation: https://cloud.google.com/kubernetes-engine/
108
+ .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
109
+
110
+ Logging
111
+ -------
112
+
113
+ This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
114
+ Note the following:
115
+
116
+ #. 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.
117
+ #. 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**.
118
+ #. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
119
+
120
+ Simple, environment-based configuration
121
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122
+
123
+ 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
124
+ 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
125
+ messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
126
+ event.
127
+
128
+ A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
129
+
130
+ - Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
131
+ - Invalid logging scopes: :code:`foo`, :code:`123`, etc.
132
+
133
+ **NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
134
+
135
+ Environment-Based Examples
136
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
137
+
138
+ - Enabling the default handler for all Google-based loggers
139
+
140
+ .. code-block:: console
141
+
142
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
143
+
144
+ - Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
145
+
146
+ .. code-block:: console
147
+
148
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
149
+
150
+
151
+ Advanced, code-based configuration
152
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
+
154
+ You can also configure a valid logging scope using Python's standard `logging` mechanism.
155
+
156
+ Code-Based Examples
157
+ ^^^^^^^^^^^^^^^^^^^
158
+
159
+ - Configuring a handler for all Google-based loggers
160
+
161
+ .. code-block:: python
162
+
163
+ import logging
164
+
165
+ from google.cloud import library_v1
166
+
167
+ base_logger = logging.getLogger("google")
168
+ base_logger.addHandler(logging.StreamHandler())
169
+ base_logger.setLevel(logging.DEBUG)
170
+
171
+ - Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
172
+
173
+ .. code-block:: python
174
+
175
+ import logging
176
+
177
+ from google.cloud import library_v1
178
+
179
+ base_logger = logging.getLogger("google.cloud.library_v1")
180
+ base_logger.addHandler(logging.StreamHandler())
181
+ base_logger.setLevel(logging.DEBUG)
182
+
183
+ Logging details
184
+ ~~~~~~~~~~~~~~~
185
+
186
+ #. 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
187
+ logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
188
+ :code:`logging.getLogger("google").propagate = True` in your code.
189
+ #. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
190
+ one library, but decide you need to also set up environment-based logging configuration for another library.
191
+
192
+ #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
193
+ if the code -based configuration gets applied first.
194
+
195
+ #. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
196
+ executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
197
+ (This is the reason for 2.i. above.)