Python + Firebase Cloud Storage - Upload/Download Files | Pyrebase

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 29. 07. 2024
  • In today's video I show just how easy it is to upload or download files from cloud storage using Firebase. Python has a handy library called "Pyrebase" which takes care of most of the details, so you need less than 10 lines of code to get started!👇 LINKS AND INFO! 👇
    Firebase: firebase.google.com
    Follow me on Github!
    github.com/Dirk-Sandberg
    Consider donating to me if you are able to and appreciate my content: www.paypal.me/eriksandbergsof...
    Any and all donations are super appreciated! ❀
    This video uses the following music:
    Gymnopedie No 1 by Kevin MacLeod is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
    Source: incompetech.com/music/royalty-...
    Artist: incompetech.com/
  • Věda a technologie

Komentáƙe • 136

  • @niooni7946
    @niooni7946 Pƙed 3 lety

    So elegant, clean and straightforward. Nice one

  • @bajangsekacang
    @bajangsekacang Pƙed 2 lety

    Awesome, simple and straight to the point....

  • @bvladimirpl
    @bvladimirpl Pƙed rokem

    You are totally right, this is awesome! Thanks Erik for share this.

  • @khalilshaik6161
    @khalilshaik6161 Pƙed 4 lety +1

    very clear explanation, thanks!

  • @damoimyers2651
    @damoimyers2651 Pƙed 3 lety

    Simple! Easy! Fantastic!

  • @jafd7806
    @jafd7806 Pƙed 4 lety +1

    Nice video Erik, and Happy New Year!

  • @terrencelangston355
    @terrencelangston355 Pƙed 4 lety +2

    The best hands down. Waiting for Mapview for IOS bro!!!!!!!!!

  • @joiepatsy4991
    @joiepatsy4991 Pƙed 4 lety +3

    Hey dude thanks for this information, this help me a lot. Subscribed already.

  • @geekthegeek730
    @geekthegeek730 Pƙed 4 lety +1

    Thank you so much. it was really helpful to me

  • @sadeeppriyankara6400
    @sadeeppriyankara6400 Pƙed 3 lety

    Easy and work fine... Thank you very much

  • @debjyotibanerjee7750
    @debjyotibanerjee7750 Pƙed 3 lety

    Very Lucid!!! Great job man!!!!!!!

  • @felipepereira1967
    @felipepereira1967 Pƙed 3 lety

    I love Python and Firebase!

  • @lebohangmhlane1807
    @lebohangmhlane1807 Pƙed 4 lety

    Great Tut. Thank you Erik. I am finding it tricky to delete the uploaded file. Please consider adding that Tut to your next video, or just below this comment for me and anyone else who shares my predicament.

  • @nawfelsekrafi
    @nawfelsekrafi Pƙed 3 lety

    very clean man .. thnx very much

  • @unknownerror9425
    @unknownerror9425 Pƙed 4 lety

    NICE WORK BROTHER, KEEP IT UP

  • @mateusantonio6713
    @mateusantonio6713 Pƙed 9 měsĂ­ci

    Thanks Bro!

  • @jeffreyaaron123
    @jeffreyaaron123 Pƙed 4 lety

    Thanks for this :)

  • @ogibalboa6517
    @ogibalboa6517 Pƙed 4 lety

    tx man u saved a life here !

  • @mattd2185j
    @mattd2185j Pƙed 4 lety

    Awesome!

  • @apoorvachaudhari3664
    @apoorvachaudhari3664 Pƙed 3 lety

    Thank you so much!!!

  • @ccggcc4635
    @ccggcc4635 Pƙed 3 lety

    ê°ì‚Źí•©ë‹ˆë‹€. ë‹č신은 나의 영웅읎에요

    • @erik-sandberg
      @erik-sandberg  Pƙed 3 lety

      환영합니닀 ìČœë§Œì—ìš”

  • @yubin_jo
    @yubin_jo Pƙed 3 lety

    thank you so much!

  • @zakarialabiad9435
    @zakarialabiad9435 Pƙed 4 lety

    Very help full bro tnx ♄

  • @raymondmichael4987
    @raymondmichael4987 Pƙed 3 lety

    subbed today, good content

  • @HelloWorld-fh2ge
    @HelloWorld-fh2ge Pƙed 2 lety

    Thanks a lot...

  • @davidmika7049
    @davidmika7049 Pƙed 4 lety

    Sweet!

  • @georgebanulis4676
    @georgebanulis4676 Pƙed 4 lety

    Hi, instead of download the file can we get the url?

  • @balazskisfali
    @balazskisfali Pƙed 3 lety

    Hi Erik, which text editor are you using here?

  • @kjyong2985
    @kjyong2985 Pƙed 2 lety

    hey , can you try with the real time data base?when i upload the data with just using push , it will auto create a random string child name for me , i think i cant retrieve the data for it

  • @muhammaddanial8163
    @muhammaddanial8163 Pƙed 4 lety

    how to upload image and save it as url in firebase

  • @ko-mment
    @ko-mment Pƙed 2 lety

    Good video🙂

  • @aydosenes
    @aydosenes Pƙed 4 lety

    is it possible to delete the file that i have uploaded to the firebase cloud storage using python?

  • @programmerrdai
    @programmerrdai Pƙed 3 lety +1

    . Thank you so much

  • @ioandraghici3538
    @ioandraghici3538 Pƙed 3 lety

    how did you add pyrebase in buildozer?

  • @Samadhan_Tidke
    @Samadhan_Tidke Pƙed 3 lety

    Can we use the live data from firebase to loacal system ( suppose there are new users in our app and we have recomend them videos instantaly we have our recomendation system but we need there instat data which is available on my firebase storage ) can we do that ??

  • @subijoyacharya3189
    @subijoyacharya3189 Pƙed 3 lety

    Is ID token necessary to pass every time we create pyrebase project.

  • @sugandhasingh3833
    @sugandhasingh3833 Pƙed 2 lety

    how i can convert these images into grayscale after uploading to cloud?

  • @aguspray
    @aguspray Pƙed 4 lety

    how to download all image in firebase storage folder?

  • @circuitdesigner7489
    @circuitdesigner7489 Pƙed 3 lety

    I created a project in firebase but their was no databaseUrl in the config please help

  • @RohitKumar-lq4bz
    @RohitKumar-lq4bz Pƙed 3 lety

    Hey Erik, thanks for your awesome videos. I need a help. Can you please create a video to create session and logout using kivy and mysql?

  • @durgeshchandrapatel5943
    @durgeshchandrapatel5943 Pƙed 3 lety +1

    What to do for android apps????

  • @UnpluggedPerformance
    @UnpluggedPerformance Pƙed 3 lety

    nice one!

  • @SaifulIslam-lc1dk
    @SaifulIslam-lc1dk Pƙed 3 lety

    Thank you. it's really helpful. I need to know one think. Now days i am trying to make a mobile app. i have a web server. but i don't know. how to upload image to my web server from kivy mobile app. Please help me. How can i do?

  • @ruturajpatil8689
    @ruturajpatil8689 Pƙed 3 lety

    download() missing 1 required positional argument: 'filename' getting this error please help
    although i have passed the file name

  • @alejandrolandaverde9112
    @alejandrolandaverde9112 Pƙed 3 lety

    How can I download all the files in a folder?

  • @kebabsharif9627
    @kebabsharif9627 Pƙed 2 lety

    Hello dear can you please tell us how to install pyrebase , because I'm getting error and not found any solution on line. 2.54 min please tell me how you did this shortcut.

  • @sukma58
    @sukma58 Pƙed 3 lety +1

    Please help me i cant run my app on android when im using pyrebase, espacially theres an error "NoModule Name google.protobuf

  • @emanuelbarreira2007
    @emanuelbarreira2007 Pƙed rokem

    what do I use nowadays: pyrebase or firebase-admin?

  • @portlandoregongdr965
    @portlandoregongdr965 Pƙed 3 lety

    it seems awesome but... what if I already using firebase for realtime database?

  • @bytenol
    @bytenol Pƙed 4 lety +1

    i'm a fan

  • @juanmarinho2110
    @juanmarinho2110 Pƙed 4 lety +2

    AAAAAAAAAAAAAAAAAA salvou meu rolĂȘ FODA PAKCAS !!!!!!! BIRLLL !!!

  • @lonewolfcoding5208
    @lonewolfcoding5208 Pƙed 3 lety

    what about other files like pdf etc..?

  • @joiepatsy4991
    @joiepatsy4991 Pƙed 4 lety

    Somebody know how if just wanna access the file?

  • @thepirate_kinz1509
    @thepirate_kinz1509 Pƙed rokem

    But what if you just want to load the image from firebase cloud storage without downloading it

  • @circuitdesigner7489
    @circuitdesigner7489 Pƙed 3 lety

    Can i send some text file from python to firebase

  • @joelnadar3194
    @joelnadar3194 Pƙed 2 lety

    It can also be used to Upload PDF Files Right?

  • @ibrahimsincap3705
    @ibrahimsincap3705 Pƙed 2 lety

    I get "no module named pyrebase" error even tho I installed it :((

  • @fungamesandriddles528
    @fungamesandriddles528 Pƙed 3 lety

    Question
    Hi Erik. Thanks for the tutorials, I've learned a lot from you. If I wanted to incorporate a global high score chart for my game, would firebase be the way to go or would you recommend something else?

  • @akshay3590
    @akshay3590 Pƙed 4 lety

    where is the code, not able to find on github

  • @nickdrost7401
    @nickdrost7401 Pƙed 4 lety +3

    Happy New Year!

  • @ManojShan
    @ManojShan Pƙed 4 lety +1

    Hey Erik, I'm having issues while downloading the files.
    I can upload the files with now issues, but I can't download the files. The program runs fine (No errors) but still the file is not downloading. I have changed the rules such that a user can access only specific user files (That is their own folder) and the upload seems to work without any issues but I can't download the file. Please help me ASAP.
    By the way you explained things very nice.

    • @tristanfogle1680
      @tristanfogle1680 Pƙed rokem

      2 years later same problem, for some reason the downloading files doesnt support authentication

  • @manishpatel3177
    @manishpatel3177 Pƙed 3 lety

    Addressing the error most people getting :
    download() missing 1 required positional argument: 'filename'
    Actually, in the download function, you are required to give 2 arguments. 1st- Path, 2nd - Filename
    For example :
    storage.child(path_on_cloud).download("./","image.jpg")

  • @efeakaroz4761
    @efeakaroz4761 Pƙed 3 lety

    What is your mouse model name?

  • @gunboundvegamoron
    @gunboundvegamoron Pƙed 3 lety

    thank u me sirvio

  • @ce096-kandarppatel5
    @ce096-kandarppatel5 Pƙed 3 lety

    Hey bro can you guide for deleting a file from storage

  • @b.1851
    @b.1851 Pƙed 4 lety +1

    Da man!!

  • @sagarhm2237
    @sagarhm2237 Pƙed 2 lety

    Bro download is not working plzzzz help me out

  • @terrencelangston355
    @terrencelangston355 Pƙed 4 lety

    Hey can I share my iOS app with you to test with TestFlight I owe a lot to you with your videos they helped me tackle iOS mobile. Also I wanted to know if I added the Kivy-garden source code to project will that help with map view?

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety

      Sure! You can check the About section on my profile to send me an email with a link to Test Flight :)
      Not sure what you mean exactly by "help with map view"

  • @nishanthpoojari9658
    @nishanthpoojari9658 Pƙed 4 lety

    Thanks for this bro. But if we used firebase in our project and making apk using buildozer then the apk crashes. Please help me.

  • @flutemelody8503
    @flutemelody8503 Pƙed 3 lety

    It takes alot of time to view the image uploaded on firebase

  • @themafia690
    @themafia690 Pƙed 2 lety

    But how to stream some thing online plz make video on that

  • @novastepnovastep9710
    @novastepnovastep9710 Pƙed 4 lety

    Thank you for this video, do you know how to delete a file from python on firebase ?
    For example i put a file on firebase storage and then i want to remove it, i tryed to do this line " storage.child(path_on_cloud).delete(path_on_cloud)" but i got an error : 'Storage' object has no attribute 'bucket'...
    it's weird because i can download and put files on my storage but i can't remove them..

    • @jaikumaran2607
      @jaikumaran2607 Pƙed 4 lety

      Have you tried ".remove" instead of ".delete". You can give try.

  • @seangray9780
    @seangray9780 Pƙed 4 lety

    Hey dude, is there anyway for kivy to access iOS gallery to select pictures for the Kivy app profile pic?

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety

      Yes, it's possible. I showed a demo of this here: czcams.com/video/MkKHqX44Mv8/video.html
      The problem is the code is convoluted and there are some fixes that need to be made. I was working on it for a bit but got distracted by other things :(

  • @asgaraliyev8740
    @asgaraliyev8740 Pƙed 4 lety +4

    what about getting the uploaded file link again?

    • @japsimransingh9933
      @japsimransingh9933 Pƙed 3 lety

      yes this is possible :- "url = storage.child(cloudfilename).get_url(None)" this get_url method will return u the url of the desired file (cloudfilename)

  • @onkarkumbhar1610
    @onkarkumbhar1610 Pƙed 4 lety

    Does this also work for audio files.
    Cause it would be a great help.

  • @-tharun-gb7qy
    @-tharun-gb7qy Pƙed 4 lety

    can we download multiple files or a folder from cloud instead of one file

    • @yagyabuttan3522
      @yagyabuttan3522 Pƙed 4 lety

      Am searching for the same any luck? please help.

  • @cristianalexismejia
    @cristianalexismejia Pƙed 4 lety +1

    Hello Erik, I'm trying to deploy it in Xcode but I get the following error "No module named 'pyrebase'" , please help me

  • @tismond
    @tismond Pƙed 4 lety

    Is there a way to have the file downloaded to a specific folder and not just to the working directory?

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety +1

      Of course! It's saving to the working directory in the video because path_local = "my_image.jpg". If you want to put it in a subdirectory of your project called "images", just change path_local = "images/my_image.jpg". Or, you can specify an absolute path by writing something like path_local = "/path/to/somewhere/my_image.jpg"

    • @tismond
      @tismond Pƙed 4 lety

      @@erik-sandberg my download code is slightly different from yours in that it asks for a path and a filename as shown below:
      for i in range(2)
      filename='test'+str(i+1)+'.jpg'
      location='Events/event1/'+filename
      path_local= 'images/'
      storage.child(location).download(path_local,filename)
      The download portion of the code asks for both path and filename bt for the life of me I cannot get the downloadedfiles to go anywhere but in the working drectory.

  • @zakarialabiad9435
    @zakarialabiad9435 Pƙed 4 lety

    Why u dont make a video of programin kivy app has two tabs . Upload tab and gallery tab shows all pics in the firebase

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety +1

      Nice idea, I'll put it on my list :)

    • @moviearttv5604
      @moviearttv5604 Pƙed 4 lety

      @@erik-sandberg i am working on it now , if you make any tutorial please lemme know

  • @johnmwansa4180
    @johnmwansa4180 Pƙed 4 lety

    brother pls the video how to changer imei number for andoid using python pls i need the video

  • @jhonona6960
    @jhonona6960 Pƙed 4 lety +1

    I have a error, when I want download file, show me: TypeError: download() missing 1 required positional argument: 'filename'

    • @SherazManzoorOfficial
      @SherazManzoorOfficial Pƙed 3 lety

      same here

    • @jhonona6960
      @jhonona6960 Pƙed 3 lety +1

      @@SherazManzoorOfficial I solve it this way: storage.child(path_on_cloud).download(path="path_to_save/", filename="name_image.jpg")

    • @SherazManzoorOfficial
      @SherazManzoorOfficial Pƙed 3 lety

      @@jhonona6960 thank you very much

  • @mahitejavlogs
    @mahitejavlogs Pƙed 3 lety +1

    error at this line - AttributeError: 'Storage' object has no attribute 'put' how can i resolve this

  • @relaxednerd8448
    @relaxednerd8448 Pƙed 4 lety

    Hey man I keep having problems when I try to install pyrebase. I use pip install pyrebase. My python version is 3.8. Pls help : )

  • @fenchai4892
    @fenchai4892 Pƙed 4 lety +1

    Hi, how would you download the entire folder? or download 1 then delete as it gets downloaded? (without knowing the filenames)
    edit: this is what worked for me...
    for file in files:
    print(file.name)
    print(storage.child(file.name).get_url(None))
    storage.child(file.name).download(os.path.basename(file.name))
    storage.child(file.name).delete(file.name)
    everything downloads just fine but even the folder gets deleted lol (bucket/records/file1.pdf, file2.pdf... etc

    • @akashmrk
      @akashmrk Pƙed 4 lety

      What is 'files' here ??

    • @marcozacaria3371
      @marcozacaria3371 Pƙed 2 lety

      Hi I am trying to download images from a specific folder. I tried your code but it downloads everything, even images from other folders. have you figured it out?

  • @moviearttv5604
    @moviearttv5604 Pƙed 4 lety

    How can i write it , if i want to make it for android not for web

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety

      The code is the same when deploying to android. You might get some issues when using the pyrebase module on android (I did on iOS), but it's related to just the Authentication portion of pyrebase. If you're not using the authentication portion, you can edit the pyrebase module and get rid of all code related to authentication, then include it as a normal module in your python project. If you need help deploying to android -- I'll have a video coming out soon about that, or you should ask in the Kivy Discord support channels for personal help! discordapp.com/channels/423249981340778496/423250272316293120

    • @moviearttv5604
      @moviearttv5604 Pƙed 4 lety

      @@erik-sandberg thanks a lot , i am waiting the video, and already joined ur Discord 😁

  • @yashmathur6409
    @yashmathur6409 Pƙed 3 lety

    Make a video on how to use firebase for chatting app

  • @olekkarlinski242
    @olekkarlinski242 Pƙed 4 lety

    Hey Erik, I have a question to you. I want to download a file from my Firebase Storage but I also want to save it with it's original name (the same filename as it is in the Storage). How can I do it? Because at your tutorial I can see that you are manualy typing the name of the file that is dowloaded.
    Greetings from Poland!

    • @yagyabuttan3522
      @yagyabuttan3522 Pƙed 4 lety

      hey! am searching for a solution for the same, can you share if you have found any?

  • @java_Developer93
    @java_Developer93 Pƙed 4 lety +1

    And the video can be thrown into the database ?))

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety +2

      Yep, the video can go into the database, it just takes a while cause it's rather large. Works like a charm!

    • @java_Developer93
      @java_Developer93 Pƙed 4 lety

      @@erik-sandberg thanks

  • @aybarslan
    @aybarslan Pƙed 3 lety +1

    If anyone having DatabaseURL problem like i do you should create new realtime database which is abov Storage in left then you need to add that link to the config file like "databaseURL": "xxxxxx" that

    • @luchodore
      @luchodore Pƙed 2 lety +1

      thanks bro, you solved my problem

  • @Kunal98v
    @Kunal98v Pƙed 4 lety

    Can i upload an entire folder using this ?
    Please help!

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety +1

      Just loop through every file in your folder!

    • @patwekaraftab
      @patwekaraftab Pƙed 4 lety +1

      @@erik-sandberg can you please give the following code

    • @Kunal98v
      @Kunal98v Pƙed 4 lety +3

      @@patwekaraftab
      import os
      entries= os.listdir('C:/Users/Kunal/Desktop/New folder (2)')

      for entry in entries:
      path_on_local='C:/Users/Kunal/Desktop/New folder (2)/'+entry
      path_on_cloud='/images/'+entry
      storage.child(path_on_cloud).put(path_on_local)
      print(entry)

    • @patwekaraftab
      @patwekaraftab Pƙed 4 lety +1

      @@Kunal98v thanks mate

    • @jonathannthani1806
      @jonathannthani1806 Pƙed 4 lety

      @@Kunal98v Thanks for this. But what about the code to download an entire folder from firebase?

  • @hadikachmar2556
    @hadikachmar2556 Pƙed 4 lety

    can you post your discord again ?

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety

      Kivy's Discord channel: discordapp.com/channels/423249981340778496/423250272316293120

    • @hadikachmar2556
      @hadikachmar2556 Pƙed 4 lety

      @@erik-sandberg not working

    • @erik-sandberg
      @erik-sandberg  Pƙed 4 lety +1

      @@hadikachmar2556 Hmm, I wonder if that hasn't worked the whole time. Try this one instead: chat.kivy.org

  • @dbinott
    @dbinott Pƙed 3 lety +1

    No commits to pyrebase in 4 years.

  • @uditysingh1316
    @uditysingh1316 Pƙed 3 lety +1

    Kivy is dead