datalab gcp package vs gcloud

314 Views Asked by At

I have been working with python (interacting with BigQuery and Cloud Storage) for several months and more recently have been using Datalab for similar tasks. I'd appreciate clarification on the difference between the gcloud (aka gcloud-python) package and the gcp package that is used in the datalab examples. Datalab doesn't seem to know about gcloud (trying to import it results in "ImportError: No module named gcloud").

Update: Devs on my project have used a variety of python packages over the past year in working with the Google Cloud Platform. At times, some packages were unstable but improved with subsequent releases. In some cases the functionality within these packages overlaps and we are looking for expert opinions on which package(s) to standardize on, and/or recommendations on which packages are best suited for which use-cases.

In particular, we used boto at a time when gcloud-python was unstable, but we assume that if we don't have a need to support access to AWS that we are better off using a Google-specific library rather than boto. This page which describes/recommends(?) using boto seems actively maintained -- does that mean tht it is a preferred alternative or is the goal just to provide devs with many alternatives?

If this is not an appropriate SO question, I will delete.

1

There are 1 best solutions below

3
On

gcloud is designed for CLI use. The gcp package is designed specifically for DataLab, and is a more OOP-oriented API, where you will create objects that you can reference later in other cells.