google-apps-chat 0.2.2__tar.gz → 0.2.4__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.
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/PKG-INFO +96 -7
- google_apps_chat-0.2.4/README.rst +197 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat/__init__.py +8 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat/gapic_version.py +1 -1
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/__init__.py +8 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/gapic_metadata.json +30 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/gapic_version.py +1 -1
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/async_client.py +386 -23
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/client.py +398 -23
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/transports/base.py +57 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/transports/grpc.py +77 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/transports/grpc_asyncio.py +105 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/transports/rest.py +476 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/transports/rest_base.py +118 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/__init__.py +8 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/deletion_metadata.py +4 -0
- google_apps_chat-0.2.4/google/apps/chat_v1/types/space_notification_setting.py +172 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google_apps_chat.egg-info/PKG-INFO +96 -7
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google_apps_chat.egg-info/SOURCES.txt +1 -0
- google_apps_chat-0.2.4/google_apps_chat.egg-info/requires.txt +8 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/setup.py +6 -6
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/tests/unit/gapic/chat_v1/test_chat_service.py +4443 -2720
- google_apps_chat-0.2.2/README.rst +0 -108
- google_apps_chat-0.2.2/google_apps_chat.egg-info/requires.txt +0 -8
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/LICENSE +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/MANIFEST.in +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat/py.typed +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/py.typed +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/__init__.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/__init__.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/pagers.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/services/chat_service/transports/__init__.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/action_status.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/annotation.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/attachment.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/chat_service.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/contextual_addon.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/event_payload.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/group.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/history_state.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/matched_url.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/membership.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/message.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/reaction.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/slash_command.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/space.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/space_event.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/space_read_state.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/space_setup.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/thread_read_state.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/user.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google/apps/chat_v1/types/widgets.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google_apps_chat.egg-info/dependency_links.txt +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google_apps_chat.egg-info/not-zip-safe +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/google_apps_chat.egg-info/top_level.txt +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/setup.cfg +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/tests/__init__.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/tests/unit/__init__.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/tests/unit/gapic/__init__.py +0 -0
- {google_apps_chat-0.2.2 → google_apps_chat-0.2.4}/tests/unit/gapic/chat_v1/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: google-apps-chat
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Google Apps Chat API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-apps-chat
|
|
6
6
|
Author: Google LLC
|
|
@@ -23,12 +23,12 @@ Classifier: Operating System :: OS Independent
|
|
|
23
23
|
Classifier: Topic :: Internet
|
|
24
24
|
Requires-Python: >=3.7
|
|
25
25
|
License-File: LICENSE
|
|
26
|
-
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.
|
|
27
|
-
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.
|
|
28
|
-
Requires-Dist: proto-plus<2.0.
|
|
29
|
-
Requires-Dist: proto-plus<2.0.
|
|
30
|
-
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.
|
|
31
|
-
Requires-Dist: google-apps-card<1.0.
|
|
26
|
+
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
|
|
27
|
+
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
|
|
28
|
+
Requires-Dist: proto-plus<2.0.0,>=1.22.3
|
|
29
|
+
Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
|
|
30
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0,>=3.20.2
|
|
31
|
+
Requires-Dist: google-apps-card<1.0.0,>=0.1.2
|
|
32
32
|
|
|
33
33
|
Python Client for Chat API
|
|
34
34
|
==========================
|
|
@@ -138,3 +138,92 @@ Next Steps
|
|
|
138
138
|
|
|
139
139
|
.. _Chat API Product documentation: https://developers.google.com/chat/
|
|
140
140
|
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
|
|
141
|
+
|
|
142
|
+
Logging
|
|
143
|
+
-------
|
|
144
|
+
|
|
145
|
+
This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
|
|
146
|
+
Note the following:
|
|
147
|
+
|
|
148
|
+
#. 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.
|
|
149
|
+
#. 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**.
|
|
150
|
+
#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
|
|
151
|
+
|
|
152
|
+
Simple, environment-based configuration
|
|
153
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
154
|
+
|
|
155
|
+
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
|
|
156
|
+
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
|
|
157
|
+
messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
|
|
158
|
+
event.
|
|
159
|
+
|
|
160
|
+
A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
|
|
161
|
+
|
|
162
|
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
|
|
163
|
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
|
|
164
|
+
|
|
165
|
+
**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
|
|
166
|
+
|
|
167
|
+
Environment-Based Examples
|
|
168
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
169
|
+
|
|
170
|
+
- Enabling the default handler for all Google-based loggers
|
|
171
|
+
|
|
172
|
+
.. code-block:: console
|
|
173
|
+
|
|
174
|
+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
|
|
175
|
+
|
|
176
|
+
- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
|
|
177
|
+
|
|
178
|
+
.. code-block:: console
|
|
179
|
+
|
|
180
|
+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
Advanced, code-based configuration
|
|
184
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
185
|
+
|
|
186
|
+
You can also configure a valid logging scope using Python's standard `logging` mechanism.
|
|
187
|
+
|
|
188
|
+
Code-Based Examples
|
|
189
|
+
^^^^^^^^^^^^^^^^^^^
|
|
190
|
+
|
|
191
|
+
- Configuring a handler for all Google-based loggers
|
|
192
|
+
|
|
193
|
+
.. code-block:: python
|
|
194
|
+
|
|
195
|
+
import logging
|
|
196
|
+
|
|
197
|
+
from google.cloud.translate_v3 import translate
|
|
198
|
+
|
|
199
|
+
base_logger = logging.getLogger("google")
|
|
200
|
+
base_logger.addHandler(logging.StreamHandler())
|
|
201
|
+
base_logger.setLevel(logging.DEBUG)
|
|
202
|
+
|
|
203
|
+
- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
|
|
204
|
+
|
|
205
|
+
.. code-block:: python
|
|
206
|
+
|
|
207
|
+
import logging
|
|
208
|
+
|
|
209
|
+
from google.cloud.translate_v3 import translate
|
|
210
|
+
|
|
211
|
+
base_logger = logging.getLogger("google.cloud.library_v1")
|
|
212
|
+
base_logger.addHandler(logging.StreamHandler())
|
|
213
|
+
base_logger.setLevel(logging.DEBUG)
|
|
214
|
+
|
|
215
|
+
Logging details
|
|
216
|
+
~~~~~~~~~~~~~~~
|
|
217
|
+
|
|
218
|
+
#. 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
|
|
219
|
+
logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
|
|
220
|
+
:code:`logging.getLogger("google").propagate = True` in your code.
|
|
221
|
+
#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
|
|
222
|
+
one library, but decide you need to also set up environment-based logging configuration for another library.
|
|
223
|
+
|
|
224
|
+
#. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
|
|
225
|
+
if the code -based configuration gets applied first.
|
|
226
|
+
|
|
227
|
+
#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
|
|
228
|
+
executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
|
|
229
|
+
(This is the reason for 2.i. above.)
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
Python Client for Chat API
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
|preview| |pypi| |versions|
|
|
5
|
+
|
|
6
|
+
`Chat API`_:
|
|
7
|
+
|
|
8
|
+
- `Client Library Documentation`_
|
|
9
|
+
- `Product Documentation`_
|
|
10
|
+
|
|
11
|
+
.. |preview| image:: https://img.shields.io/badge/support-preview-orange.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-apps-chat.svg
|
|
14
|
+
:target: https://pypi.org/project/google-apps-chat/
|
|
15
|
+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-apps-chat.svg
|
|
16
|
+
:target: https://pypi.org/project/google-apps-chat/
|
|
17
|
+
.. _Chat API: https://developers.google.com/chat/
|
|
18
|
+
.. _Client Library Documentation: https://googleapis.dev/python/google-apps-chat/latest
|
|
19
|
+
.. _Product Documentation: https://developers.google.com/chat/
|
|
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 Chat API.`_
|
|
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 Chat API.: https://developers.google.com/chat/
|
|
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-apps-chat/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
|
|
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-apps-chat
|
|
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-apps-chat
|
|
96
|
+
|
|
97
|
+
Next Steps
|
|
98
|
+
~~~~~~~~~~
|
|
99
|
+
|
|
100
|
+
- Read the `Client Library Documentation`_ for Chat API
|
|
101
|
+
to see other available methods on the client.
|
|
102
|
+
- Read the `Chat API 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
|
+
.. _Chat API Product documentation: https://developers.google.com/chat/
|
|
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.translate_v3 import translate
|
|
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.translate_v3 import translate
|
|
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.)
|
|
@@ -123,6 +123,11 @@ from google.apps.chat_v1.types.space_event import (
|
|
|
123
123
|
ListSpaceEventsResponse,
|
|
124
124
|
SpaceEvent,
|
|
125
125
|
)
|
|
126
|
+
from google.apps.chat_v1.types.space_notification_setting import (
|
|
127
|
+
GetSpaceNotificationSettingRequest,
|
|
128
|
+
SpaceNotificationSetting,
|
|
129
|
+
UpdateSpaceNotificationSettingRequest,
|
|
130
|
+
)
|
|
126
131
|
from google.apps.chat_v1.types.space_read_state import (
|
|
127
132
|
GetSpaceReadStateRequest,
|
|
128
133
|
SpaceReadState,
|
|
@@ -224,6 +229,9 @@ __all__ = (
|
|
|
224
229
|
"ListSpaceEventsRequest",
|
|
225
230
|
"ListSpaceEventsResponse",
|
|
226
231
|
"SpaceEvent",
|
|
232
|
+
"GetSpaceNotificationSettingRequest",
|
|
233
|
+
"SpaceNotificationSetting",
|
|
234
|
+
"UpdateSpaceNotificationSettingRequest",
|
|
227
235
|
"GetSpaceReadStateRequest",
|
|
228
236
|
"SpaceReadState",
|
|
229
237
|
"UpdateSpaceReadStateRequest",
|
|
@@ -120,6 +120,11 @@ from .types.space_event import (
|
|
|
120
120
|
ListSpaceEventsResponse,
|
|
121
121
|
SpaceEvent,
|
|
122
122
|
)
|
|
123
|
+
from .types.space_notification_setting import (
|
|
124
|
+
GetSpaceNotificationSettingRequest,
|
|
125
|
+
SpaceNotificationSetting,
|
|
126
|
+
UpdateSpaceNotificationSettingRequest,
|
|
127
|
+
)
|
|
123
128
|
from .types.space_read_state import (
|
|
124
129
|
GetSpaceReadStateRequest,
|
|
125
130
|
SpaceReadState,
|
|
@@ -168,6 +173,7 @@ __all__ = (
|
|
|
168
173
|
"GetMembershipRequest",
|
|
169
174
|
"GetMessageRequest",
|
|
170
175
|
"GetSpaceEventRequest",
|
|
176
|
+
"GetSpaceNotificationSettingRequest",
|
|
171
177
|
"GetSpaceReadStateRequest",
|
|
172
178
|
"GetSpaceRequest",
|
|
173
179
|
"GetThreadReadStateRequest",
|
|
@@ -213,12 +219,14 @@ __all__ = (
|
|
|
213
219
|
"Space",
|
|
214
220
|
"SpaceBatchUpdatedEventData",
|
|
215
221
|
"SpaceEvent",
|
|
222
|
+
"SpaceNotificationSetting",
|
|
216
223
|
"SpaceReadState",
|
|
217
224
|
"SpaceUpdatedEventData",
|
|
218
225
|
"Thread",
|
|
219
226
|
"ThreadReadState",
|
|
220
227
|
"UpdateMembershipRequest",
|
|
221
228
|
"UpdateMessageRequest",
|
|
229
|
+
"UpdateSpaceNotificationSettingRequest",
|
|
222
230
|
"UpdateSpaceReadStateRequest",
|
|
223
231
|
"UpdateSpaceRequest",
|
|
224
232
|
"UploadAttachmentRequest",
|
|
@@ -85,6 +85,11 @@
|
|
|
85
85
|
"get_space_event"
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
|
+
"GetSpaceNotificationSetting": {
|
|
89
|
+
"methods": [
|
|
90
|
+
"get_space_notification_setting"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
88
93
|
"GetSpaceReadState": {
|
|
89
94
|
"methods": [
|
|
90
95
|
"get_space_read_state"
|
|
@@ -145,6 +150,11 @@
|
|
|
145
150
|
"update_space"
|
|
146
151
|
]
|
|
147
152
|
},
|
|
153
|
+
"UpdateSpaceNotificationSetting": {
|
|
154
|
+
"methods": [
|
|
155
|
+
"update_space_notification_setting"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
148
158
|
"UpdateSpaceReadState": {
|
|
149
159
|
"methods": [
|
|
150
160
|
"update_space_read_state"
|
|
@@ -235,6 +245,11 @@
|
|
|
235
245
|
"get_space_event"
|
|
236
246
|
]
|
|
237
247
|
},
|
|
248
|
+
"GetSpaceNotificationSetting": {
|
|
249
|
+
"methods": [
|
|
250
|
+
"get_space_notification_setting"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
238
253
|
"GetSpaceReadState": {
|
|
239
254
|
"methods": [
|
|
240
255
|
"get_space_read_state"
|
|
@@ -295,6 +310,11 @@
|
|
|
295
310
|
"update_space"
|
|
296
311
|
]
|
|
297
312
|
},
|
|
313
|
+
"UpdateSpaceNotificationSetting": {
|
|
314
|
+
"methods": [
|
|
315
|
+
"update_space_notification_setting"
|
|
316
|
+
]
|
|
317
|
+
},
|
|
298
318
|
"UpdateSpaceReadState": {
|
|
299
319
|
"methods": [
|
|
300
320
|
"update_space_read_state"
|
|
@@ -385,6 +405,11 @@
|
|
|
385
405
|
"get_space_event"
|
|
386
406
|
]
|
|
387
407
|
},
|
|
408
|
+
"GetSpaceNotificationSetting": {
|
|
409
|
+
"methods": [
|
|
410
|
+
"get_space_notification_setting"
|
|
411
|
+
]
|
|
412
|
+
},
|
|
388
413
|
"GetSpaceReadState": {
|
|
389
414
|
"methods": [
|
|
390
415
|
"get_space_read_state"
|
|
@@ -445,6 +470,11 @@
|
|
|
445
470
|
"update_space"
|
|
446
471
|
]
|
|
447
472
|
},
|
|
473
|
+
"UpdateSpaceNotificationSetting": {
|
|
474
|
+
"methods": [
|
|
475
|
+
"update_space_notification_setting"
|
|
476
|
+
]
|
|
477
|
+
},
|
|
448
478
|
"UpdateSpaceReadState": {
|
|
449
479
|
"methods": [
|
|
450
480
|
"update_space_read_state"
|