nvidia-nat-redis 1.4.0a20251024__py3-none-any.whl → 1.4.0a20251028__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nat/plugins/redis/memory.py +7 -0
- nat/plugins/redis/object_store.py +9 -0
- nat/plugins/redis/redis_object_store.py +3 -1
- {nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/METADATA +2 -2
- nvidia_nat_redis-1.4.0a20251028.dist-info/RECORD +15 -0
- nvidia_nat_redis-1.4.0a20251024.dist-info/RECORD +0 -15
- {nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/WHEEL +0 -0
- {nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/top_level.txt +0 -0
nat/plugins/redis/memory.py
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
from pydantic import Field
|
|
17
|
+
from pydantic import SecretStr
|
|
17
18
|
|
|
18
19
|
from nat.builder.builder import Builder
|
|
19
20
|
from nat.cli.register_workflow import register_memory
|
|
@@ -25,6 +26,7 @@ class RedisMemoryClientConfig(MemoryBaseConfig, name="redis_memory"):
|
|
|
25
26
|
host: str = Field(default="localhost", description="Redis server host")
|
|
26
27
|
db: int = Field(default=0, description="Redis DB")
|
|
27
28
|
port: int = Field(default=6379, description="Redis server port")
|
|
29
|
+
password: SecretStr | None = Field(default=None, description="Password for the Redis server")
|
|
28
30
|
key_prefix: str = Field(default="nat", description="Key prefix to use for redis keys")
|
|
29
31
|
embedder: EmbedderRef = Field(description=("Instance name of the memory client instance from the workflow "
|
|
30
32
|
"configuration object."))
|
|
@@ -40,9 +42,14 @@ async def redis_memory_client(config: RedisMemoryClientConfig, builder: Builder)
|
|
|
40
42
|
|
|
41
43
|
from .schema import ensure_index_exists
|
|
42
44
|
|
|
45
|
+
redis_password = None
|
|
46
|
+
if config.password is not None:
|
|
47
|
+
redis_password = config.password.get_secret_value()
|
|
48
|
+
|
|
43
49
|
redis_client = redis.Redis(host=config.host,
|
|
44
50
|
port=config.port,
|
|
45
51
|
db=config.db,
|
|
52
|
+
password=redis_password,
|
|
46
53
|
decode_responses=True,
|
|
47
54
|
socket_timeout=5.0,
|
|
48
55
|
socket_connect_timeout=5.0)
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
from pydantic import Field
|
|
17
|
+
from pydantic import SecretStr
|
|
18
|
+
from pydantic import field_serializer
|
|
17
19
|
|
|
18
20
|
from nat.builder.builder import Builder
|
|
19
21
|
from nat.cli.register_workflow import register_object_store
|
|
@@ -29,6 +31,13 @@ class RedisObjectStoreClientConfig(ObjectStoreBaseConfig, name="redis"):
|
|
|
29
31
|
db: int = Field(default=0, description="The Redis logical database number")
|
|
30
32
|
port: int = Field(default=6379, description="The port of the Redis server")
|
|
31
33
|
bucket_name: str = Field(description="The name of the bucket to use for the object store")
|
|
34
|
+
password: SecretStr | None = Field(default=None, description="The password for the Redis server")
|
|
35
|
+
|
|
36
|
+
@field_serializer('password')
|
|
37
|
+
def dump_secret(self, v: SecretStr | None) -> str | None:
|
|
38
|
+
if v is None:
|
|
39
|
+
return None
|
|
40
|
+
return v.get_secret_value()
|
|
32
41
|
|
|
33
42
|
|
|
34
43
|
@register_object_store(config_type=RedisObjectStoreClientConfig)
|
|
@@ -33,7 +33,7 @@ class RedisObjectStore(ObjectStore):
|
|
|
33
33
|
Each object is stored as a single binary value at key "nat/object_store/{bucket_name}/{object_key}".
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
|
-
def __init__(self, *, bucket_name: str, host: str, port: int, db: int):
|
|
36
|
+
def __init__(self, *, bucket_name: str, host: str, port: int, db: int, password: str | None = None):
|
|
37
37
|
|
|
38
38
|
super().__init__()
|
|
39
39
|
|
|
@@ -41,6 +41,7 @@ class RedisObjectStore(ObjectStore):
|
|
|
41
41
|
self._host = host
|
|
42
42
|
self._port = port
|
|
43
43
|
self._db = db
|
|
44
|
+
self._password = password
|
|
44
45
|
self._client: redis.Redis | None = None
|
|
45
46
|
|
|
46
47
|
async def __aenter__(self) -> "RedisObjectStore":
|
|
@@ -52,6 +53,7 @@ class RedisObjectStore(ObjectStore):
|
|
|
52
53
|
host=self._host,
|
|
53
54
|
port=self._port,
|
|
54
55
|
db=self._db,
|
|
56
|
+
password=self._password,
|
|
55
57
|
socket_timeout=5.0,
|
|
56
58
|
socket_connect_timeout=5.0,
|
|
57
59
|
)
|
{nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat-redis
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.0a20251028
|
|
4
4
|
Summary: Subpackage for Redis integration in NeMo Agent toolkit
|
|
5
5
|
Author: NVIDIA Corporation
|
|
6
6
|
Maintainer: NVIDIA Corporation
|
|
@@ -16,7 +16,7 @@ Requires-Python: <3.14,>=3.11
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE-3rd-party.txt
|
|
18
18
|
License-File: LICENSE.md
|
|
19
|
-
Requires-Dist: nvidia-nat==v1.4.
|
|
19
|
+
Requires-Dist: nvidia-nat==v1.4.0a20251028
|
|
20
20
|
Requires-Dist: redis~=4.3.4
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
nat/meta/pypi.md,sha256=TpeNbVZJxzvEf0Gh3BGvLHPYsKnXjgM_KQVCayBPXso,1090
|
|
2
|
+
nat/plugins/redis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
nat/plugins/redis/memory.py,sha256=U6cFp0QYb2Peh5f_zNMqM_uPgPC-E3jU1dgxcoPDf1k,2854
|
|
4
|
+
nat/plugins/redis/object_store.py,sha256=ZcNFG6Hb2V2zA-5sRS2US18lkTwEoPV4xAce4gHsVHI,2031
|
|
5
|
+
nat/plugins/redis/redis_editor.py,sha256=nkSIWi1HUPald088fXTuF0rmZ0uS_3V65Vxy20vLSgk,9746
|
|
6
|
+
nat/plugins/redis/redis_object_store.py,sha256=wRKB3HGfywoHp_XF2Rc4JqnAmJtGLb5usAfXeqNzINY,4402
|
|
7
|
+
nat/plugins/redis/register.py,sha256=dJBKi-7W72ipkmZTOIo1E3ETffmJIlYhQTOlrkiFH3A,834
|
|
8
|
+
nat/plugins/redis/schema.py,sha256=Zcas3hIIqG7wuR94baYRFycmnccB3CuGmTs4p8Vv4mA,5589
|
|
9
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
10
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
11
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/METADATA,sha256=3Xc_Oke0BtPl0GspsqYCd9u3nFJ3k6lHJWJcUzjetI4,1894
|
|
12
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/entry_points.txt,sha256=nyS8t8L9CbRFIMlE70RQBtJXrflBP4Ltl5zAkIl44So,56
|
|
14
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
15
|
+
nvidia_nat_redis-1.4.0a20251028.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
nat/meta/pypi.md,sha256=TpeNbVZJxzvEf0Gh3BGvLHPYsKnXjgM_KQVCayBPXso,1090
|
|
2
|
-
nat/plugins/redis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
nat/plugins/redis/memory.py,sha256=wqj_UYqnllc4kTCtFDz3eu-OZnyPWXxNZ3e6G992OGQ,2546
|
|
4
|
-
nat/plugins/redis/object_store.py,sha256=f_GtCTZ3KHfxE4f0lAzKaoAoInAZZki4Dfo7hrKCAHA,1681
|
|
5
|
-
nat/plugins/redis/redis_editor.py,sha256=nkSIWi1HUPald088fXTuF0rmZ0uS_3V65Vxy20vLSgk,9746
|
|
6
|
-
nat/plugins/redis/redis_object_store.py,sha256=DX46GEQl4H1Ivf2wrRaSimNcq6EfvRsm-xhyiECudoQ,4302
|
|
7
|
-
nat/plugins/redis/register.py,sha256=dJBKi-7W72ipkmZTOIo1E3ETffmJIlYhQTOlrkiFH3A,834
|
|
8
|
-
nat/plugins/redis/schema.py,sha256=Zcas3hIIqG7wuR94baYRFycmnccB3CuGmTs4p8Vv4mA,5589
|
|
9
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
10
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
11
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/METADATA,sha256=Y-eqwKHcFpz5ocwR8YDbmWRy24gQxTmnEw1Af0xJIQ8,1894
|
|
12
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/entry_points.txt,sha256=nyS8t8L9CbRFIMlE70RQBtJXrflBP4Ltl5zAkIl44So,56
|
|
14
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
15
|
-
nvidia_nat_redis-1.4.0a20251024.dist-info/RECORD,,
|
{nvidia_nat_redis-1.4.0a20251024.dist-info → nvidia_nat_redis-1.4.0a20251028.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|