Google Cloud Compute Python Library package naming confusion

96 views Asked by At

In the Google Compute Python library we seem to have 2 packages - screenshot GCP Python Client GitHub.

When importing the various modules should we refer to compute or compute_v1? It seems compute internally refers to compute_v1? Why is this structure introduced and what would be the right/consistent way to import the modules? Most of the examples on internet and GCP documentation use compute_v1.

e.g.

from google.cloud import compute_v1

OR

from google.cloud import compute
0

There are 0 answers