| 1 |
Metadata-Version: 2.4 |
| 2 |
Name: googleapis-common-protos |
| 3 |
Version: 1.75.0 |
| 4 |
Summary: Common protobufs used in Google APIs |
| 5 |
Author-email: Google LLC <[email protected]> |
| 6 |
License: Apache 2.0 |
| 7 |
Project-URL: Repository, https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos |
| 8 |
Classifier: Development Status :: 5 - Production/Stable |
| 9 |
Classifier: Intended Audience :: Developers |
| 10 |
Classifier: License :: OSI Approved :: Apache Software License |
| 11 |
Classifier: Programming Language :: Python |
| 12 |
Classifier: Programming Language :: Python :: 3 |
| 13 |
Classifier: Programming Language :: Python :: 3.9 |
| 14 |
Classifier: Programming Language :: Python :: 3.10 |
| 15 |
Classifier: Programming Language :: Python :: 3.11 |
| 16 |
Classifier: Programming Language :: Python :: 3.12 |
| 17 |
Classifier: Programming Language :: Python :: 3.13 |
| 18 |
Classifier: Programming Language :: Python :: 3.14 |
| 19 |
Classifier: Operating System :: OS Independent |
| 20 |
Classifier: Topic :: Internet |
| 21 |
Requires-Python: >=3.9 |
| 22 |
Description-Content-Type: text/x-rst |
| 23 |
License-File: LICENSE |
| 24 |
Requires-Dist: protobuf<8.0.0,>=4.25.8 |
| 25 |
Provides-Extra: grpc |
| 26 |
Requires-Dist: grpcio<2.0.0,>=1.44.0; extra == "grpc" |
| 27 |
Dynamic: license-file |
| 28 |
|
| 29 |
Python Client for Service Config |
| 30 |
================================ |
| 31 |
|
| 32 |
|stable| |pypi| |versions| |
| 33 |
|
| 34 |
- `Client Library Documentation`_ |
| 35 |
|
| 36 |
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg |
| 37 |
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels |
| 38 |
.. |pypi| image:: https://img.shields.io/pypi/v/googleapis-common-protos.svg |
| 39 |
:target: https://pypi.org/project/googleapis-common-protos/ |
| 40 |
.. |versions| image:: https://img.shields.io/pypi/pyversions/googleapis-common-protos.svg |
| 41 |
:target: https://pypi.org/project/googleapis-common-protos/ |
| 42 |
.. _Client Library Documentation: https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos/summary_overview |
| 43 |
|
| 44 |
Quick Start |
| 45 |
----------- |
| 46 |
|
| 47 |
In order to use this library, you first need to go through the following steps: |
| 48 |
|
| 49 |
1. `Select or create a Cloud Platform project.`_ |
| 50 |
2. `Enable billing for your project.`_ |
| 51 |
3. `Set up Authentication.`_ |
| 52 |
|
| 53 |
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project |
| 54 |
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project |
| 55 |
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html |
| 56 |
|
| 57 |
Installation |
| 58 |
~~~~~~~~~~~~ |
| 59 |
|
| 60 |
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that |
| 61 |
creates isolated Python environments. These isolated environments can have separate |
| 62 |
versions of Python packages, which allows you to isolate one project's dependencies |
| 63 |
from the dependencies of other projects. |
| 64 |
|
| 65 |
With `venv`_, it's possible to install this library without needing system |
| 66 |
install permissions, and without clashing with the installed system |
| 67 |
dependencies. |
| 68 |
|
| 69 |
.. _`venv`: https://docs.python.org/3/library/venv.html |
| 70 |
|
| 71 |
|
| 72 |
Code samples and snippets |
| 73 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 74 |
|
| 75 |
Code samples and snippets live in the `samples/`_ folder. |
| 76 |
|
| 77 |
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos/samples |
| 78 |
|
| 79 |
|
| 80 |
Supported Python Versions |
| 81 |
^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 82 |
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of |
| 83 |
Python. |
| 84 |
|
| 85 |
Python >= 3.9, including 3.14 |
| 86 |
|
| 87 |
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch |
| 88 |
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches |
| 89 |
|
| 90 |
Unsupported Python Versions |
| 91 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 92 |
Python <= 3.8 |
| 93 |
|
| 94 |
If you are using an `end-of-life`_ |
| 95 |
version of Python, we recommend that you update as soon as possible to an actively supported version. |
| 96 |
|
| 97 |
.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches |
| 98 |
|
| 99 |
Mac/Linux |
| 100 |
^^^^^^^^^ |
| 101 |
|
| 102 |
.. code-block:: console |
| 103 |
|
| 104 |
python3 -m venv <your-env> |
| 105 |
source <your-env>/bin/activate |
| 106 |
pip install googleapis-common-protos |
| 107 |
|
| 108 |
|
| 109 |
Windows |
| 110 |
^^^^^^^ |
| 111 |
|
| 112 |
.. code-block:: console |
| 113 |
|
| 114 |
py -m venv <your-env> |
| 115 |
.\<your-env>\Scripts\activate |
| 116 |
pip install googleapis-common-protos |
| 117 |
|
| 118 |
Next Steps |
| 119 |
~~~~~~~~~~ |
| 120 |
|
| 121 |
- Read the `Client Library Documentation`_ for Service Config |
| 122 |
to see other available methods on the client. |
| 123 |
- View this `README`_ to see the full list of Cloud |
| 124 |
APIs that we cover. |
| 125 |
|
| 126 |
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst |
| 127 |
|
| 128 |
Logging |
| 129 |
------- |
| 130 |
|
| 131 |
This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes. |
| 132 |
Note the following: |
| 133 |
|
| 134 |
#. 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. |
| 135 |
#. 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**. |
| 136 |
#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below. |
| 137 |
|
| 138 |
Simple, environment-based configuration |
| 139 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 140 |
|
| 141 |
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 |
| 142 |
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 |
| 143 |
messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging |
| 144 |
event. |
| 145 |
|
| 146 |
A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log. |
| 147 |
|
| 148 |
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc. |
| 149 |
- Invalid logging scopes: :code:`foo`, :code:`123`, etc. |
| 150 |
|
| 151 |
**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers. |
| 152 |
|
| 153 |
Environment-Based Examples |
| 154 |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 155 |
|
| 156 |
- Enabling the default handler for all Google-based loggers |
| 157 |
|
| 158 |
.. code-block:: console |
| 159 |
|
| 160 |
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google |
| 161 |
|
| 162 |
- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`): |
| 163 |
|
| 164 |
.. code-block:: console |
| 165 |
|
| 166 |
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1 |
| 167 |
|
| 168 |
|
| 169 |
Advanced, code-based configuration |
| 170 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 171 |
|
| 172 |
You can also configure a valid logging scope using Python's standard `logging` mechanism. |
| 173 |
|
| 174 |
Code-Based Examples |
| 175 |
^^^^^^^^^^^^^^^^^^^ |
| 176 |
|
| 177 |
- Configuring a handler for all Google-based loggers |
| 178 |
|
| 179 |
.. code-block:: python |
| 180 |
|
| 181 |
import logging |
| 182 |
|
| 183 |
from google.cloud import library_v1 |
| 184 |
|
| 185 |
base_logger = logging.getLogger("google") |
| 186 |
base_logger.addHandler(logging.StreamHandler()) |
| 187 |
base_logger.setLevel(logging.DEBUG) |
| 188 |
|
| 189 |
- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`): |
| 190 |
|
| 191 |
.. code-block:: python |
| 192 |
|
| 193 |
import logging |
| 194 |
|
| 195 |
from google.cloud import library_v1 |
| 196 |
|
| 197 |
base_logger = logging.getLogger("google.cloud.library_v1") |
| 198 |
base_logger.addHandler(logging.StreamHandler()) |
| 199 |
base_logger.setLevel(logging.DEBUG) |
| 200 |
|
| 201 |
Logging details |
| 202 |
~~~~~~~~~~~~~~~ |
| 203 |
|
| 204 |
#. 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 |
| 205 |
logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set |
| 206 |
:code:`logging.getLogger("google").propagate = True` in your code. |
| 207 |
#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for |
| 208 |
one library, but decide you need to also set up environment-based logging configuration for another library. |
| 209 |
|
| 210 |
#. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual |
| 211 |
if the code -based configuration gets applied first. |
| 212 |
|
| 213 |
#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get |
| 214 |
executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured. |
| 215 |
(This is the reason for 2.i. above.) |