-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
variable STORAGE_EMULATOR_HOST #202
Comments
Ah, interesting, looks like Google has been changing their approach here (parent ticket: googleapis/google-cloud-python#8475) -- used to be the case that each of their systems was configured to inter-operate with the CLI tool's Yeah, we could get behind updating our support here! I guess the most reasonable thing would be for all the We'd definitely accept a PR to help us move in this direction, though ideally we'd come up with a reasonable enough approach that can be applied to all the |
I think this PR can be applied to other packages as well. However, the maintainers should discuss and decide which approach to implement across all packages. |
Solves a couple related goals in a consistent way across all projects: * allows users to provide an api host via code instead of only via env var * load that value at time of constructing the client rather than import time Thanks to @josipbudzaki in #542 and @adriangb in #539 for providing a baseline approach. Fixes #202.
I've gone ahead and created #557, merging together the work from various folks in various per-project PRs (thanks @josipbudzaki!) along with our thoughts on having a single approach for all projects. Hopefully, this shoud solve both the problems of letting folks set these host values at time of object initialization as well as via code instead of env var. My plan is to merge and release that code shortly, just waiting on review! |
Solves a couple related goals in a consistent way across all projects: * allows users to provide an api host via code instead of only via env var * load that value at time of constructing the client rather than import time Thanks to @josipbudzaki in #542 and @adriangb in #539 for providing a baseline approach. Fixes #202.
Solves a couple related goals in a consistent way across all projects: * allows users to provide an api host via code instead of only via env var * load that value at time of constructing the client rather than import time Thanks to @josipbudzaki in #542 and @adriangb in #539 for providing a baseline approach. Fixes #202.
Hey folks,
I'm looking into how to use https://github.com/fsouza/fake-gcs-server to test both googles standard storage client
google.cloud.storage.Storage
and thegcloud.aio.storage.Storage
client at the same time.google.cloud.storage.Storage
just made it possible to passclient_options=ClientOptions(api_endpoint='https://your_storage_emulator_address')
to the client at initialization time while the glcoud-aio relies on a module wide global. Would you be open to adding a similar initialization option for thegcloud.aio.storage.Storage
client? The module wide global is problematic because there's no way to monkeypatch it safely in an async context which means you can only talk to one API_ENDPOINT at a time. Would be happy to help with implementation on this if this sounds reasonable.Thanks in advance!
The text was updated successfully, but these errors were encountered: