In this section, we will cover the different methods and tools available for uploading and downloading data to and from Google Cloud Storage.
We are going to discuss the following methods for uploading and downloading data.
The gsutil command-line tool
the Google Cloud Storage API
the Google Cloud Storage web interface.
Let’s discuss the gsutil command line tool.
gsutil is a Python application that lets you access Cloud Storage from the command line.
You can use gsutil to do a wide range of bucket and object management tasks, including:
Creating and deleting buckets.
Uploading, downloading, and deleting objects.
Listing buckets and objects.
Moving, copying, and renaming objects.
Editing object and bucket Access Control Lists (ACLs).
gsutil performs all operations, including uploads and downloads, using HTTPS and transport-layer security (TLS).
Let’s get started with gsutil
I will switch to my Google Cloud Console and activate Cloud Shell.
What is Cloud Shell?
Cloud Shell is an interactive shell environment for Google Cloud that lets you learn and experiment with Google Cloud and manage your projects and resources from your web browser.
With Cloud Shell, the Google Cloud CLI (gcloud) and other utilities you need are pre-installed, fully authenticated, up-to-date, and always available when you need them.
Cloud Shell is free for all users.
Activate cloud shell on screen recording
Use the gsutil cp command to copy the image from the filesystem to the bucket you created:
There are client libraries for interacting with Cloud Storage. We would be using the Python Client Library to demonstrate uploads and downloads.
Switch to cloud shell editor and explain
Finally the Google Cloud Storage web interface.
The Google Cloud Storage web interface is a user-friendly way to upload and download data to and from Google Cloud Storage. It allows you to easily upload and download data, manage your data, and perform other operations on your data.