Skip to content

Commit 873435d

Browse files
committed
fix generation for google-cloud-access-context-manager,google-cloud-audit-log,grafeas,grpc-google-iam-v1
1 parent 07618fe commit 873435d

File tree

4 files changed

+608
-11
lines changed

4 files changed

+608
-11
lines changed

.librarian/state.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ libraries:
272272
tag_format: '{id}-v{version}'
273273
- id: google-cloud-access-context-manager
274274
version: 0.3.0
275-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
275+
last_generated_commit: e8365a7f88fabe8717cb8322b8ce784b03b6daea
276276
apis:
277277
- path: google/identity/accesscontextmanager/v1
278278
service_config: accesscontextmanager_v1.yaml
@@ -282,7 +282,10 @@ libraries:
282282
- packages/google-cloud-access-context-manager
283283
preserve_regex: []
284284
remove_regex:
285-
- ^packages/google-cloud-access-context-manager/google/.*/.*_pb2\.(?:py|pyi)$/
285+
- ^packages/google-cloud-access-context-manager/google/.*/.*(?:\.proto|_pb2\.(?:py|pyi))$
286+
- .repo-metadata.json
287+
- README.rst
288+
- docs/summary_overview.md
286289
tag_format: '{id}-v{version}'
287290
- id: google-cloud-advisorynotifications
288291
version: 0.4.0
@@ -566,7 +569,10 @@ libraries:
566569
- packages/google-cloud-audit-log
567570
preserve_regex: []
568571
remove_regex:
569-
- ^packages/google-cloud-audit-log/google/.*/.*_pb2\.(?:py|pyi)$/
572+
- ^packages/google-cloud-audit-log/google/.*/.*(?:\.proto|_pb2\.(?:py|pyi))$
573+
- .repo-metadata.json
574+
- README.rst
575+
- docs/summary_overview.md
570576
tag_format: '{id}-v{version}'
571577
- id: google-cloud-automl
572578
version: 2.17.0
@@ -4493,7 +4499,7 @@ libraries:
44934499
tag_format: '{id}-v{version}'
44944500
- id: grafeas
44954501
version: 1.16.0
4496-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
4502+
last_generated_commit: e8365a7f88fabe8717cb8322b8ce784b03b6daea
44974503
apis:
44984504
- path: grafeas/v1
44994505
service_config: grafeas_v1.yaml
@@ -4506,21 +4512,24 @@ libraries:
45064512
- scripts/client-post-processing
45074513
- samples/snippets/README.rst
45084514
- tests/system
4509-
- grafeas/grafeas.py
4510-
- grafeas/grafeas/__init__.py
4515+
- grafeas/grafeas\.py
4516+
- ^packages/grafeas/grafeas/__init__.py
45114517
- grafeas/grafeas/grafeas_v1/types.py
45124518
remove_regex:
45134519
- packages/grafeas
45144520
tag_format: '{id}-v{version}'
45154521
- id: grpc-google-iam-v1
45164522
version: 0.14.2
4517-
last_generated_commit: 55319b058f8a0e46bbeeff30e374e4b1f081f494
4523+
last_generated_commit: e8365a7f88fabe8717cb8322b8ce784b03b6daea
45184524
apis:
45194525
- path: google/iam/v1
45204526
service_config: iam_meta_api.yaml
45214527
source_roots:
45224528
- packages/grpc-google-iam-v1/
45234529
preserve_regex: []
45244530
remove_regex:
4525-
- ^packages/grpc-google-iam-v1/google/.*/.*_pb2\.(?:py|pyi)$/
4531+
- ^packages/grpc-google-iam-v1/google/iam/v1/[^/]*(?:\.proto|_pb2\.(?:py|pyi))$
4532+
- .repo-metadata.json
4533+
- README.rst
4534+
- docs/summary_overview.md
45264535
tag_format: '{id}-v{version}'

packages/google-cloud-access-context-manager/docs/README.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
Python Client for Access Context Manager
2+
========================================
3+
4+
|preview| |pypi| |versions|
5+
6+
`Access Context Manager`_:
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-cloud-access-context-manager.svg
14+
:target: https://pypi.org/project/google-cloud-access-context-manager/
15+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-access-context-manager.svg
16+
:target: https://pypi.org/project/google-cloud-access-context-manager/
17+
.. _Access Context Manager: https://cloud.google.com/access-context-manager/docs/overview
18+
.. _Client Library Documentation: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-access-context-manager
19+
.. _Product Documentation: https://cloud.google.com/access-context-manager/docs/overview
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 Access Context Manager.`_
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 Access Context Manager.: https://cloud.google.com/access-context-manager/docs/overview
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-access-context-manager/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-access-context-manager
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-access-context-manager
96+
97+
Next Steps
98+
~~~~~~~~~~
99+
100+
- Read the `Client Library Documentation`_ for Access Context Manager
101+
to see other available methods on the client.
102+
- Read the `Access Context Manager 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+
.. _Access Context Manager Product documentation: https://cloud.google.com/access-context-manager/docs/overview
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.)

packages/google-cloud-audit-log/docs/README.rst

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

0 commit comments

Comments
 (0)