FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Feat: Add api_key argument to Client constructor by andrewsg · Pull Request #1441 · googleapis/python-storage · GitHub

This repository was archived by the owner on Mar 31, 2026. It is now read-only.
/ python-storage Public archive

Feat: Add api_key argument to Client constructor - #1441

Merged
gcf-merge-on-green[bot] merged 3 commits into
mainfrom
api-key
Feb 27, 2025
Merged

Feat: Add api_key argument to Client constructor#1441
gcf-merge-on-green[bot] merged 3 commits into
mainfrom
api-key

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

andrewsg requested review from a team February 21, 2025 23:58
product-auto-label Bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/python-storage API. labels Feb 21, 2025
:param api_key:
(Optional) An API key. Mutually exclusive with any other credentials.
This parameter is an alias for setting `client_options.api_key` and
will supercede any api key set in the `client_options` parameter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for working on this. While I understand that allowing api key-based access is the main goal, is there a specific reason why we need to add a parameter as an alias?

client_options is an existing parameter, and both a dictionary or ClientOption instance is supported, making it quite easy for users to pass it in.

client_options = {"api_key": api_key}
client = Client(client_options=client_options)

Could you share more context on the user journey and requirements for this, thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This was the result of a discussion with the PM. Basically, the overarching design philosophy was to make it as easy to use as possible, and this alias is inexpensive for us to maintain and improves usability and legibility.

andrewsg requested a review from a team February 27, 2025 18:35
andrewsg added the automerge Merge the pull request once unit tests and other checks pass. label Feb 27, 2025
gcf-merge-on-green Bot merged commit c869e15 into main Feb 27, 2025
gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 27, 2025
gcf-merge-on-green Bot deleted the api-key branch February 27, 2025 23:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/python-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL