METADATA 9.1 KB

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