Spec-Zone.ru › Polars

polars.Config.set_default_credential_provider

classmethod Config.set_default_credential_provider(
    credential_provider: CredentialProviderFunction | Literal['auto'] | None,
) → type[Config]

Set a default credential provider.

Sets the default credential provider to be used for functions that read / write to cloud storage.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

Parameters:
credential_provider

Provide a function that can be called to provide cloud storage credentials. The function is expected to return a dictionary of credential keys along with an optional credential expiry time.

Can also be set to None, which globally disables auto-initialization of credential providers, or “auto” (the default behavior).

Examples

>>> pl.Config.set_default_credential_provider(
...     pl.CredentialProviderAWS(
...         assume_role={"RoleArn": "...", "RoleSessionName": "..."}
...     )
... )
<class 'polars.config.Config'>

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.Config.set_default_credential_provider.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API