firebase / firebase-admin-python

Firebase Admin Python SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
995 stars 304 forks source link

[FR] Add support for storage emulator #570

Open PaulRudin opened 2 years ago

PaulRudin commented 2 years ago

The python admin sdk does not appear to support the firebase storage emulator. Other emulators are supported, and the node sdk has this support.

google-oss-bot commented 2 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

qhaas commented 2 years ago

We encountered this today, it is listed as 'future' in the admin sdk emulator support matrix, hopefully this feature is available soon.

rbarrette commented 2 years ago

bump.

lahirumaramba commented 2 years ago

Hey @yuchenshi, @christhompsongoogle FYI.

vizaiapp commented 1 year ago

Any updates on this?

christhompsongoogle commented 1 year ago

Hi @vizaiapp, no timeline to share on this just yet but it's still on our radar.

+cc @taeold

prggTheProgrammer commented 1 year ago

I think there already is support for storage emulator, it just isn't documented well in the docs. The docs say you need to use FIREBASE_STORAGE_EMULATOR_HOST, but you actually have to use STORAGE_EMULATOR_HOST. (see #693 and this answer) And by doing this, I was able to use the python admin sdk to connect to the storage emulator.

lahirumaramba commented 1 year ago

If setting STORAGE_EMULATOR_HOST works that means emulator support is now added to the storage library. We still need to map FIREBASE_STORAGE_EMULATOR_HOST to STORAGE_EMULATOR_HOST internally in the Admin SDK. The change should be similar to: https://github.com/firebase/firebase-admin-go/issues/520

In the meantime, please use STORAGE_EMULATOR_HOST

bowenng commented 3 months ago

Can we please update the documentation for Python SDK at least?

mcelroyengineering commented 2 months ago

I was able to get it working in python by setting my STORAGE_EMULATOR_HOST environment variable equal to http://127.0.0.1:9199. Can I get confirmation that this is a safe work around for now?

christhompsongoogle commented 2 months ago

I spoke to Lahiru, setting STORAGE_EMULATOR_HOST is okay to use the emulator for now. We still need to map FIREBASE_STORAGE_EMULATOR_HOST to STORAGE_EMULATOR_HOST in the SDK