Entra ID credentials provider implementation for Redis-py client
Project description
Installation
pip install redis-entraid
Usage
First you have to configure IdentityProvider, for this purpose there's 2 factory methods:
def create_provider_from_managed_identity(
identity_type: ManagedIdentityType,
resource: str,
id_type: Optional[ManagedIdentityIdType] = None,
id_value: Optional[str] = '',
**kwargs
) -> EntraIDIdentityProvider
def create_provider_from_service_principal(
client_credential,
client_id: str,
scopes: list = [],
timeout: Optional[float] = None,
token_kwargs: dict = {},
**app_kwargs
) -> EntraIDIdentityProvider
This credential provider is running a scheduled background tasks to renew tokens, the specifics might be configured as well:
auth_config = TokenAuthConfig(idp)
cred_provider = EntraIdCredentialsProvider(auth_config)
To obtain token and run background task simply call:
# Sync
cred_provider.get_credentials()
# Async
await cred_provider.get_credentials_async()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redis_entraid-0.1.0b1.tar.gz.
File metadata
- Download URL: redis_entraid-0.1.0b1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e04392eaaf05552374bf56120e4143fb2f90152d83354d3460a203b00a585f
|
|
| MD5 |
596ed100f9628fbeeb504f05ec7677c2
|
|
| BLAKE2b-256 |
4dc329f3c6959c24f4e79685500f5b0f0b3baaa7768c7c0391d462d421c7cd6a
|
File details
Details for the file redis_entraid-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: redis_entraid-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68c6ab7ad1ba269ef197576a1253a9e72ad448c8ef70a4b3ac4db7ccc95b34cf
|
|
| MD5 |
3a4a05ecddd6d91466c933dd2cde65a0
|
|
| BLAKE2b-256 |
6f594ea71b513f95285138df8e8fbc2857f3b25ade1b6fee1ac487202dc51b9e
|