Тёмный

Accessing Images in Firebase Storage in Python 

The Whiz
Подписаться 666
Просмотров 6 тыс.
50% 1

Hello! Welcome to this video. In this video, you will learn how to access images in firebase storage in python without having to download them locally. This will make your program easier to upload onto web hosts like Heroku and protect yourself from downloading all your user images on large platforms.
If you run into any errors, comment down below and I will help you out!
Important Links:
- Firebase: firebase.com/
- Code: drive.google.com/drive/folder...
Download Image Locally:
blob = bucket.get_blob('image.png') #this is the name of your image
blob.download_to_filename(r"./image.png") #the r in front is to indicate that this is locally downloading - it is required
Timings:
0:00 - Set up Firebase Storage & Service Account
2:45 - Firebase Credentials
7:30 - Accessing Images from Storage
13:00 - Testing & Final Comments
If you learned from this video, give this video a thumbs up and subscribe to this channel! To stay updated on all our future videos, click the notification bell!
Enjoy and happy coding!

Опубликовано:

 

11 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@DeathCross-kn9ou
@DeathCross-kn9ou 24 дня назад
you opened up my eyes into a new world and saved me from repeating a year YOU AREEEE THE BESTTTTTTTTTTTTT I HOPE YOU NEVER STOP UPLOADING
@ashleyoffret7362
@ashleyoffret7362 Год назад
I've been stuck on my python project and this is exactly what I was looking for. Thank you!
@zacharyullom4614
@zacharyullom4614 2 месяца назад
Super helpful, thank you!
@aniketkumar221
@aniketkumar221 Год назад
Thanks for this video 💖💖💖💖
@anuththaraanandaraj5165
@anuththaraanandaraj5165 Год назад
Thank you so much !!
@thisis.jacopo
@thisis.jacopo 2 года назад
Thank you!
@jfsjuan
@jfsjuan Год назад
muito bom não tinha percebido essa.....
@muazkartal2399
@muazkartal2399 Год назад
Thanks so much
@hassankhan-gn8pz
@hassankhan-gn8pz Год назад
can you tell me how your code error was resolved i am having the same error but i am unable to resolve it
@justitroyal7032
@justitroyal7032 4 месяца назад
Thankyou
@Patronesofly
@Patronesofly 3 месяца назад
So your telling me you can't just call the photos directly from firestorage? lets say I had a app that creates invoices and the invoice needed a logo I need to run these many lines of codes just to get that image? There is no direct way to get a url to that image ? Is there any way to return a list of url images that are on the db?
@JulioCesar-su4is
@JulioCesar-su4is 2 года назад
289 / 5.000 Resultados de tradução i wish i could give 200,000 likes... luckily i can only do this once. thank you very much... I really needed to do this image visualization of my firebase database and there is nothing and no one that could do it so perfectly. Thank you very much, God bless you greatly.
@l3wg471
@l3wg471 2 года назад
could you explain the sys.argv[1] part agian? if i wanted to get the the first image in storage, without specifying the name what would the code be for that?
@the_whiz
@the_whiz 2 года назад
the sys.argv[1] is basically getting the parameter that you pass into the function for when you call it in the console or if you call it via node. this is not necessary and therefore, can be removed. you can sort via date and then grab the top one because typically firebase auto sorts via date. let me know whether this article is of any help! stackoverflow.com/questions/39972388/firebase-web-storage-upload-a-file-without-specifying-its-name
@nithishp7802
@nithishp7802 Год назад
Send here, if you got the code✌️
@sugandhasingh3833
@sugandhasingh3833 2 года назад
i want to convert image into grayscale and store in firebase how is it possible can you code this it will be appreciable?
@the_whiz
@the_whiz 2 года назад
here are some solutions here you can try! stackoverflow.com/questions/12201577/how-can-i-convert-an-rgb-image-into-grayscale-in-python
@AmeyaDikshit
@AmeyaDikshit Год назад
Received the below error even after using your same code: AttributeError: 'NoneType' object has no attribute 'download_as_string' Plz help
@the_whiz
@the_whiz Год назад
I believe you might have called "blob" as both a variable and a function. Therefore, it is saying it has no attribute "download_as_string"
@pratham6412
@pratham6412 Год назад
figure it out yourself
@soundarrajanrajan7095
@soundarrajanrajan7095 2 месяца назад
@@pratham6412 plz tell me how
@ricardoaguilarsuaste40
@ricardoaguilarsuaste40 2 года назад
Hi, great video!, I have a question, I get an error in arr = np.frombuffer(blob.download_as_string(), np.vint8) It says: 'NoneType' object has no attribute 'download_as_string' Do you have any idea of how can I fix it?
@the_whiz
@the_whiz 2 года назад
I believe you might have called "blob" as both a variable and a function. Therefore, it is saying it has no attribute "download_as_string"
@ricardoaguilarsuaste40
@ricardoaguilarsuaste40 2 года назад
@@the_whiz thank you!
@itsguardiantime4928
@itsguardiantime4928 2 года назад
​@@the_whiz I'm getting the same error, how would you fix it?
@the_whiz
@the_whiz 2 года назад
@@itsguardiantime4928 did the above solution help?
@markoturban8774
@markoturban8774 Год назад
@@the_whiz It did not helped for me
@collgeper695
@collgeper695 2 года назад
How to access dynamically all the images that are present
@the_whiz
@the_whiz 2 года назад
i think the best solution is to iterate through the bucket. this article explains how you can also use gsutils instead: stackoverflow.com/questions/41461337/how-to-download-entire-folder-from-firebase-storage
@shovitprusty4050
@shovitprusty4050 2 года назад
How to retrieve lastest custom image from firebase storage??
@the_whiz
@the_whiz 2 года назад
to my knowledge, iterate and find the youngest date. however, this is definitely a question for the internet :D
@shovitprusty4050
@shovitprusty4050 2 года назад
@@the_whiz thanks a lot , can you send a code or refference of it?
@the_whiz
@the_whiz 2 года назад
@@shovitprusty4050 this is code ive written before for deleting too old entries for React Native, but you should be able to work with it since they are extremely similar when it comes to the firebase library: const querySnapshot = await firestore.collection("deersighting").get(); //make this work and not delete values in database querySnapshot.forEach(async (doc) => { if (new Date() - doc.data().created_at > 300000) { doc.ref.delete(); } else { arr.push(doc.data()); } });
@shovitprusty4050
@shovitprusty4050 2 года назад
@@the_whiz great, thanks a lot😊
Далее
Clowns abuse children#Short #Officer Rabbit #angel
00:51
Good dad 🥰 #demariki
00:17
Просмотров 9 млн
🎙ПЕСНИ ВЖИВУЮ от КВАШЕНОЙ🌹
3:09:38
Python - How To Create Firestore Database
10:13
Просмотров 10 тыс.
Python Asynchronous Programming - AsyncIO & Async/Await
25:57
Modern Graphical User Interfaces in Python
11:12
Просмотров 1,5 млн
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 72 тыс.
Firebase Firestore Python Tutorial
13:12
Просмотров 10 тыс.
Firebase Storage with Python including Flask API
29:10
Clowns abuse children#Short #Officer Rabbit #angel
00:51