We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 606a738 commit 216be71Copy full SHA for 216be71
templates/python/search_helpers.mustache
@@ -219,11 +219,13 @@
219
{{^isSyncClient}}async {{/isSyncClient}}def generate_secured_api_key(
220
self,
221
parent_api_key: str,
222
- restrictions: Optional[Union[dict, SecuredApiKeyRestrictions]] = SecuredApiKeyRestrictions(),
+ restrictions: Optional[Union[dict, SecuredApiKeyRestrictions]] = None,
223
) -> str:
224
"""
225
Helper: Generates a secured API key based on the given `parent_api_key` and given `restrictions`.
226
227
+ if restrictions is None:
228
+ restrictions = SecuredApiKeyRestrictions()
229
restrictions_dict = {}
230
if isinstance(restrictions, SecuredApiKeyRestrictions):
231
restrictions_dict = restrictions.to_dict()
0 commit comments