Skip to content

Commit 03b7063

Browse files
committed
Updated package name, added docs
1 parent 40e5fc1 commit 03b7063

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

dev_requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ uvloop
1616
vulture>=2.3.0
1717
wheel>=0.30.0
1818
numpy>=1.24.0
19-
redispy-entraid-credentials @ git+https://github.com/redis-developer/redispy-entra-credentials.git/@main
19+
redis-entraid @ git+https://github.com/redis-developer/redispy-entra-credentials.git/@main

docs/advanced_features.rst

+33
Original file line numberDiff line numberDiff line change
@@ -466,3 +466,36 @@ command is received.
466466
>>> with r.monitor() as m:
467467
>>> for command in m.listen():
468468
>>> print(command)
469+
470+
471+
Token-based authentication
472+
~~~~~~~~~~~~~~~~~~~~~~~~~~
473+
474+
Since redis-py version 5.3.0 new StreamableCredentialProvider interface was introduced.
475+
This interface describes a CredentialProvider with an ability to stream an events that will be handled by listener.
476+
477+
To keep redis-py with minimal dependencies needed to run it, we decided to separate StreamableCredentialProvider
478+
implementations in a separate packages. So If you're interested to try this feature please add them as a separate
479+
dependency to your project.
480+
481+
`EntraIdCredentialProvider` is a first implementation that allows you to integrate redis-py with Azure Cache for Redis
482+
service. It will allows you to obtain a tokens from Microsoft EntraID and authenticate/re-authenticate your connections
483+
with it in a background mode.
484+
485+
To get `EntraIdCredentialProvider` you need to install following package:
486+
487+
`pip install redispy-entraid-credentials`
488+
489+
To setup a credential provider, first you have to create and configure an IdentityProvider and provide
490+
TokenAuthConfig object.
491+
`Here's a quick guide how to do this
492+
<https://github.com/redis-developer/redispy-entra-credentials?tab=readme-ov-file#usage>`_
493+
494+
Now all you have to do is to pass an instance of `EntraIdCredentialProvider` via constructor,
495+
available for sync and async clients:
496+
497+
.. code:: python
498+
499+
>>> cred_provider = EntraIdCredentialProvider(auth_config)
500+
>>> r = Redis(credential_provider=cred_provider)
501+
>>> r.ping()

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
long_description_content_type="text/markdown",
99
keywords=["Redis", "key-value store", "database"],
1010
license="MIT",
11-
version="5.1.1",
11+
version="5.3.0b1",
1212
packages=find_packages(
1313
include=[
1414
"redis",

0 commit comments

Comments
 (0)