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

КОМЕНТАРІ • 62

  • @mrmuranga
    @mrmuranga 3 роки тому +3

    Useful, thanks. Trolled through lots of videos that were just showing how to do this using the cloud console...glad i tumbled onto this.

  • @gprasadk100
    @gprasadk100 Рік тому

    Thank you for putting this together. Very simple to follow. Thank you!

  • @rahuljain0890
    @rahuljain0890 2 роки тому +7

    This was amazing. Beautifully explained.

  • @eric9964
    @eric9964 3 роки тому

    No way this was uploaded just in time! Thanks!

  • @c0987k
    @c0987k 3 роки тому

    This video filled in the hole in Google documentation. Thanks

  • @rubenmusayelyan9528
    @rubenmusayelyan9528 6 місяців тому

    Thank you! Finally a simple, yet effective solution

  • @zakariaabderrahmanesadelao3048
    @zakariaabderrahmanesadelao3048 3 роки тому

    Thank you for the clearest explanation. you are a lifesaver.

  • @diegolopestec2
    @diegolopestec2 3 роки тому

    Jie Jenn , this is was very good tutorial. Simple, clean and practical. Congratulations my friend

  • @eneselezi5844
    @eneselezi5844 2 роки тому +2

    Great video! Thanks a lot, very easy to follow through as well

  • @claudineievangelistanascim2562
    @claudineievangelistanascim2562 2 роки тому

    thanks for sharing. very clear, helpful and help me a lot! success for you man

  • @DevSquared49
    @DevSquared49 3 роки тому

    Thank for this man. Really appreciate it.

  • @Iamdip1
    @Iamdip1 2 роки тому

    Thank you so much man, got it just on time

  • @javierzapata8911
    @javierzapata8911 Рік тому

    Absolutely excellent tutorial thank you so much🙌

  • @ShubhamTure
    @ShubhamTure 3 роки тому

    Clean and on point!

  • @juliobc408
    @juliobc408 Рік тому

    simply excellent. Thanks a lot

  • @potatocoder5090
    @potatocoder5090 9 місяців тому +1

    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?

  • @aitorsanchez2581
    @aitorsanchez2581 2 роки тому

    Thanks, it was very helpful!

  • @KeyvanTajbakhsh
    @KeyvanTajbakhsh 3 роки тому

    very clear and handy ! thnks ;)

  • @markyemets2433
    @markyemets2433 Рік тому

    Awesome tutorial!

  • @arnisudheendra7072
    @arnisudheendra7072 Рік тому

    excellent video...thank you very much

  • @rohit_mondal__
    @rohit_mondal__ Рік тому

    Thank you sir. Your videos have really helped me

  • @jamiechambers4795
    @jamiechambers4795 9 місяців тому

    Thank you so much!

  • @jorgegarciaramos3359
    @jorgegarciaramos3359 16 днів тому +2

    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! 😊

  • @mdicopriatama6380
    @mdicopriatama6380 Рік тому +3

    how did you run the script on the right side ?

  • @pavanpandya9080
    @pavanpandya9080 2 роки тому

    Great Video.

  • @ahmed-samer
    @ahmed-samer Рік тому

    Very useful video
    Merci

  • @jamesvandermost3802
    @jamesvandermost3802 2 роки тому +1

    Thank you so much!! Googles documentation is always missing a few steps...

    • @jiejenn
      @jiejenn  2 роки тому +1

      Glad the video helped.

  • @ygorleao23
    @ygorleao23 3 роки тому

    tks! This helps me a lot!

    • @jiejenn
      @jiejenn  3 роки тому

      Glad my video helped.

  • @gustavogordillogiron9016
    @gustavogordillogiron9016 2 роки тому

    Great! thanks!

    • @jiejenn
      @jiejenn  2 роки тому

      Glad the video help.

  • @hamnamalik5998
    @hamnamalik5998 3 роки тому

    Can you please make a video tut for resumable uploads through python sdk. I would be a great help.

  • @hassanalhalabi7563
    @hassanalhalabi7563 2 роки тому

    to uplode an image about 200 KB it takes about 1.5 s. do you think it ist possioble to make the process faster?

  • @abeyjoseph4780
    @abeyjoseph4780 2 роки тому

    Thank you so much

  • @abeyjoseph4780
    @abeyjoseph4780 2 роки тому

    Do you have any video related to google cloud SQL same like this

  • @pavankumarakula1466
    @pavankumarakula1466 Рік тому

    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

  • @shovanmallick5820
    @shovanmallick5820 Рік тому

    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?

  • @briansoares2075
    @briansoares2075 2 роки тому

    Can you elaborate how would you go about the code if you would be editing it on say cloudshell code editor? Same operations

    • @jiejenn
      @jiejenn  2 роки тому

      One method I can think of is using Google's gsutil tool (cloud.google.com/storage/docs/gsutil)

  • @ItheVoguer
    @ItheVoguer Рік тому

    can this be applied to production? for example in a dockerized web-server, in the api calls?

  • @usnishmukherjee1248
    @usnishmukherjee1248 2 роки тому

    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?

    • @jiejenn
      @jiejenn  2 роки тому +1

      I would suggest you try to Google your way first.

    • @usnishmukherjee1248
      @usnishmukherjee1248 2 роки тому

      @@jiejenn thanks for replying 👍

  • @christoptimist
    @christoptimist Місяць тому

    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.

    • @jiejenn
      @jiejenn  Місяць тому +1

      I will look into it.

  • @daqo98
    @daqo98 2 роки тому

    How do I deploy this application in Cloud Run without exposing the .JSON credentials?

    • @jiejenn
      @jiejenn  2 роки тому

      Not familiar with Cloud Run, but I remember one method is to use environment variable.

  • @miroslavkostov3057
    @miroslavkostov3057 2 роки тому

    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!

    • @jiejenn
      @jiejenn  2 роки тому

      Looks like your bucket object didn't get created successfully. Makes sure you are providing the correct required properties.

  • @santiagoandresortiz5563
    @santiagoandresortiz5563 2 роки тому

    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

    • @jiejenn
      @jiejenn  2 роки тому

      I would try ask the question on Stack Overflow.

  • @rubeushagrid4208
    @rubeushagrid4208 2 роки тому

    Is that an extension colouring your code like that?

    • @jiejenn
      @jiejenn  2 роки тому +1

      I use Dark Pro for the theme + my own customization.

    • @rubeushagrid4208
      @rubeushagrid4208 2 роки тому

      Thanks. Just found an extension 'Theme by language'. I like Darcula for JS but your theme is way better for python.

  • @samuelcheng7582
    @samuelcheng7582 2 роки тому

    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?

    • @jiejenn
      @jiejenn  2 роки тому +2

      I don't think I can fix it. Maybe ask Google.

  • @NiceUsername
    @NiceUsername 2 роки тому

    Is there any limitations on requests? If yes, how much?

    • @jiejenn
      @jiejenn  2 роки тому

      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.

    • @NiceUsername
      @NiceUsername 2 роки тому

      @@jiejenn oh, thanks!