Skip to content

Commit 3787d95

Browse files
feat: clients for Notebooks API V2 (#11571)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent f1f0e58 commit 3787d95

File tree

59 files changed

+24269
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+24269
-19
lines changed

‎packages/google-cloud-notebooks/.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎packages/google-cloud-notebooks/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ We support:
236236

237237
Supported versions can be found in our ``noxfile.py`` `config`_.
238238

239-
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py
239+
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-notebooks/noxfile.py
240240

241241

242242
**********

‎packages/google-cloud-notebooks/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

‎packages/google-cloud-notebooks/README.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,24 @@ In order to use this library, you first need to go through the following steps:
3636
Installation
3737
~~~~~~~~~~~~
3838

39-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
40-
create isolated Python environments. The basic problem it addresses is one of
41-
dependencies and versions, and indirectly permissions.
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.
4243

43-
With `virtualenv`_, it's possible to install this library without needing system
44+
With `venv`_, it's possible to install this library without needing system
4445
install permissions, and without clashing with the installed system
4546
dependencies.
4647

47-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
48+
.. _`venv`: https://docs.python.org/3/library/venv.html
4849

4950

5051
Code samples and snippets
5152
~~~~~~~~~~~~~~~~~~~~~~~~~
5253

53-
Code samples and snippets live in the `samples/` folder.
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-notebooks/samples
5457

5558

5659
Supported Python Versions
@@ -77,21 +80,19 @@ Mac/Linux
7780

7881
.. code-block:: console
7982
80-
pip install virtualenv
81-
virtualenv <your-env>
83+
python3 -m venv <your-env>
8284
source <your-env>/bin/activate
83-
<your-env>/bin/pip install google-cloud-notebooks
85+
pip install google-cloud-notebooks
8486
8587
8688
Windows
8789
^^^^^^^
8890

8991
.. code-block:: console
9092
91-
pip install virtualenv
92-
virtualenv <your-env>
93-
<your-env>\Scripts\activate
94-
<your-env>\Scripts\pip.exe install google-cloud-notebooks
93+
py -m venv <your-env>
94+
.\<your-env>\Scripts\activate
95+
pip install google-cloud-notebooks
9596
9697
Next Steps
9798
~~~~~~~~~~

‎packages/google-cloud-notebooks/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2021 Google LLC
2+
# Copyright 2023 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

‎packages/google-cloud-notebooks/docs/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ API Reference
2222
notebooks_v1beta1/services
2323
notebooks_v1beta1/types
2424

25+
API Reference
26+
-------------
27+
.. toctree::
28+
:maxdepth: 2
29+
30+
notebooks_v2/services
31+
notebooks_v2/types
32+
2533

2634
Changelog
2735
---------
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
NotebookService
2+
---------------------------------
3+
4+
.. automodule:: google.cloud.notebooks_v2.services.notebook_service
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.notebooks_v2.services.notebook_service.pagers
9+
:members:
10+
:inherited-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Services for Google Cloud Notebooks v2 API
2+
==========================================
3+
.. toctree::
4+
:maxdepth: 2
5+
6+
notebook_service
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Types for Google Cloud Notebooks v2 API
2+
=======================================
3+
4+
.. automodule:: google.cloud.notebooks_v2.types
5+
:members:
6+
:show-inheritance:
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 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+
from google.cloud.notebooks_v2 import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
20+
21+
from .services.notebook_service import NotebookServiceAsyncClient, NotebookServiceClient
22+
from .types.diagnostic_config import DiagnosticConfig
23+
from .types.event import Event
24+
from .types.gce_setup import (
25+
AcceleratorConfig,
26+
BootDisk,
27+
ContainerImage,
28+
DataDisk,
29+
DiskEncryption,
30+
DiskType,
31+
GceSetup,
32+
GPUDriverConfig,
33+
NetworkInterface,
34+
ServiceAccount,
35+
ShieldedInstanceConfig,
36+
VmImage,
37+
)
38+
from .types.instance import HealthState, Instance, State, UpgradeHistoryEntry
39+
from .types.service import (
40+
CheckInstanceUpgradabilityRequest,
41+
CheckInstanceUpgradabilityResponse,
42+
CreateInstanceRequest,
43+
DeleteInstanceRequest,
44+
DiagnoseInstanceRequest,
45+
GetInstanceRequest,
46+
ListInstancesRequest,
47+
ListInstancesResponse,
48+
OperationMetadata,
49+
ResetInstanceRequest,
50+
RollbackInstanceRequest,
51+
StartInstanceRequest,
52+
StopInstanceRequest,
53+
UpdateInstanceRequest,
54+
UpgradeInstanceRequest,
55+
)
56+
57+
__all__ = (
58+
"NotebookServiceAsyncClient",
59+
"AcceleratorConfig",
60+
"BootDisk",
61+
"CheckInstanceUpgradabilityRequest",
62+
"CheckInstanceUpgradabilityResponse",
63+
"ContainerImage",
64+
"CreateInstanceRequest",
65+
"DataDisk",
66+
"DeleteInstanceRequest",
67+
"DiagnoseInstanceRequest",
68+
"DiagnosticConfig",
69+
"DiskEncryption",
70+
"DiskType",
71+
"Event",
72+
"GPUDriverConfig",
73+
"GceSetup",
74+
"GetInstanceRequest",
75+
"HealthState",
76+
"Instance",
77+
"ListInstancesRequest",
78+
"ListInstancesResponse",
79+
"NetworkInterface",
80+
"NotebookServiceClient",
81+
"OperationMetadata",
82+
"ResetInstanceRequest",
83+
"RollbackInstanceRequest",
84+
"ServiceAccount",
85+
"ShieldedInstanceConfig",
86+
"StartInstanceRequest",
87+
"State",
88+
"StopInstanceRequest",
89+
"UpdateInstanceRequest",
90+
"UpgradeHistoryEntry",
91+
"UpgradeInstanceRequest",
92+
"VmImage",
93+
)

0 commit comments

Comments
 (0)