firebase / firebase/firebase-admin-python

[FR] Connect to firebase storage emulator

未關閉
#693 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
api: storage help wanted type: feature request
主要語言
Python
星號
1.2k
分支
359
平均合併
5 天 6 分鐘
30 天內合併 PR
2

描述

\*\***EDIT:**\*\*
I just discovered that it's a bug in the documentation. It is possible to connect to firebase storage emulator using the python admin sdk, but you need to set the `STORAGE_EMULATOR_HOST` environment variable instead of the `FIREBASE_STORAGE_EMULATOR_HOST` as described by the docs.
See this [answer](https://stackoverflow.com/a/75894891/17581223).
Should I close this and submit an issue somewhere else? In that case where do I need to open such issue?

**Is your feature request related to a problem? Please describe.**
I have a problem described by this [question](https://stackoverflow.com/questions/75420029/connnect-firebase-admin-storage-to-firebbase-emulator-in-python/75894891#comment133884767_75894891). But to summarize I am using firebase storage admin with python and I want to connect it to a firebase emulator running on localhost. I followed the docs [here](https://firebase.google.com/docs/emulator-suite/connect_storage#admin_sdks), added the environment variable, but now I need to get the bucket.

`bucket = storage.bucket("What do I put here?")`
If I don't put anything it gives an error, if I put a real bucket it uses that and I even tried localhost ("127.0.0.1:9199") as bucket name and it couldn't find it because it was searching for a real bucket.

**Describe the solution you'd like**
I'd like a way to get a emulated storage bucket. I think that if the environment variable is set `storage.bucket()` should return that.

**Describe alternatives you've considered**
Any other way it would be possible to use firebase storage admin with the emulator suite would be appreciated.

**Additional context**
As far as I know there is no solution for the problem described above. I don't know if this is a bug or if I'm just being dumb, so I would appreciate if you could point me in the right direction if this is not the right place.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。