Using Google Cloud Storage API in Python For Beginners
Вставка
- Опубліковано 15 чер 2024
- In this tutorial, I will be covering how to get started with using Google Cloud Storage API in Python.
Things I will be covering in the video:
1. Create a Service Account
2. Enable Google Cloud Storage API
3. Install Google Cloud Storage Python Library
4. Create a new bucket using Python
5. Accessing a bucket using Python
6. Upload File to Google Cloud Storage using Python
7. Download File From Google Cloud Storage using Python
What is Google Cloud Storage?
--------------------------------------
Google Cloud Storage is a RESTful online file storage web service for storing and accessing data on Google Cloud Platform infrastructure. The service combines the performance and scalability of Google's cloud with advanced security and sharing capabilities.
Source Code: learndataanalysis.org/source-...
📑 How to create a Cloud Service Account & Download Client JSON file: • How to create a Google...
Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------
PayPal Me: www.paypal.me/jiejenn/5
Venmo: @Jie-Jenn
Join Robinhood with my link and we'll both get a free stock 🤝 join.robinhood.com/jiej6
Timestamp:
00:00 - Intro
00:38 - Google Cloud Storage Pricing
01:21 - Google Cloud Storage API or Features
01:48 - Enable Google Cloud Storage API
03:04 - Create a Service Account and Download Client File
05:29 - Install Google Cloud Storage Python Library
06:13 - Create Google Cloud Storage Client Instance
08:38 - Create a Google Cloud Storage Bucket
11:03 - Upload Files to Google Cloud Storage Bucket
17:51 - Download Files from Google Cloud Storage Bucket
Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------
Patreon: / jiejenn
By shopping on Amazon → amzn.to/2JkGeMD
More tutorial videos on my website → LearnDataAnalysis.org
Business Inquiring: UA-cam@LearnDataAnalysis.org
#GoogleCloudStorage #Python
Useful, thanks. Trolled through lots of videos that were just showing how to do this using the cloud console...glad i tumbled onto this.
Thank you for putting this together. Very simple to follow. Thank you!
This was amazing. Beautifully explained.
No way this was uploaded just in time! Thanks!
This video filled in the hole in Google documentation. Thanks
Thank you! Finally a simple, yet effective solution
Thank you for the clearest explanation. you are a lifesaver.
Jie Jenn , this is was very good tutorial. Simple, clean and practical. Congratulations my friend
Great video! Thanks a lot, very easy to follow through as well
thanks for sharing. very clear, helpful and help me a lot! success for you man
Thank for this man. Really appreciate it.
Thank you so much man, got it just on time
Absolutely excellent tutorial thank you so much🙌
Clean and on point!
simply excellent. Thanks a lot
Thank you so much for this comprehensive end-to-end tutorial! Thank you for also showing the errors you got and how you debugged them. Do you also have end-to-end tutorials for Cloud Pub/Sub and Cloud SQL in Python?
Thanks, it was very helpful!
very clear and handy ! thnks ;)
Awesome tutorial!
excellent video...thank you very much
Thank you sir. Your videos have really helped me
Thank you so much!
Useful video, but I have a question that I can't solve, is it possible to configure the client to go through a proxy? I have only seen examples where they do it with environment variables, but I would like to be able to configure the proxy in the client instance itself. Thank you very much! 😊
how did you run the script on the right side ?
Great Video.
Very useful video
Merci
Thank you so much!! Googles documentation is always missing a few steps...
Glad the video helped.
tks! This helps me a lot!
Glad my video helped.
Great! thanks!
Glad the video help.
Can you please make a video tut for resumable uploads through python sdk. I would be a great help.
to uplode an image about 200 KB it takes about 1.5 s. do you think it ist possioble to make the process faster?
Thank you so much
helped me a lot
Do you have any video related to google cloud SQL same like this
Hi SIr ,Could you please showa demo , how to move to file from one bucket to another bucket using python function.That will be create help
can you please make a tutorial on How to run this script on google cloud function, which takes this files from my email inbox(not from local computer) and them put it on a google cloud storage bucket? so that every time I receive a file via email it should take that file and put it on google cloud storage?
Can you elaborate how would you go about the code if you would be editing it on say cloudshell code editor? Same operations
One method I can think of is using Google's gsutil tool (cloud.google.com/storage/docs/gsutil)
can this be applied to production? for example in a dockerized web-server, in the api calls?
Sure, why not?
Hi Jie Jenn, this is an excellent video. While applying the same, I got a SSLCertVerificationError on the line "bucket = storage_client.create_bucket(bucket)".
Can you help me fixing this?
I would suggest you try to Google your way first.
@@jiejenn thanks for replying 👍
I am super late, woooish. I would like to ask if you can create a tutorial videos like this for dataflow and apache beam for etl pipeline.
I will look into it.
How do I deploy this application in Cloud Run without exposing the .JSON credentials?
Not familiar with Cloud Run, but I remember one method is to use environment variable.
Hi Jie Jenn. Thanks for the video, very helpful. Although I tried identical solution to yours, just with my credentials and I am getting the following error:
--> 179 raise TypeError(f'Object of type {o.__class__.__name__} '
180 f'is not JSON serializable')
181
TypeError: Object of type Bucket is not JSON serializable
Any ideas how I can fix that?
Thanks!
Looks like your bucket object didn't get created successfully. Makes sure you are providing the correct required properties.
great video but i am having an issue when downloading......i get this error: OSError: [Errno 30] Read-only file system: '/workspace/file_name
i have my python script deployed in google app engine....please help
I would try ask the question on Stack Overflow.
Is that an extension colouring your code like that?
I use Dark Pro for the theme + my own customization.
Thanks. Just found an extension 'Theme by language'. I like Darcula for JS but your theme is way better for python.
error code:
----> from google.cloud import storage
---> from google.resumable_media.requests import RawDownload
ImportError: cannot import name 'RawDownload' from 'google.resumable_media.requests' (/usr/local/lib/python3.7/dist-packages/google/resumable_media/requests/__init__.py)
Can you fix it?
I don't think I can fix it. Maybe ask Google.
Is there any limitations on requests? If yes, how much?
Not sure if I understand your question. You can send unlimited request, but once you exceeded the free quota of the month you will start be charged for the usage.
@@jiejenn oh, thanks!