sls-memory 0.1.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alibaba Cloud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ include usage.md
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: sls-memory
3
+ Version: 0.1.0
4
+ Summary: A mem0-compatible memory SDK powered by Alibaba Cloud SLS
5
+ Author: Zhengqianyi
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/aliyun/aliyun-log-memory-sdk
8
+ Project-URL: Repository, https://github.com/aliyun/aliyun-log-memory-sdk
9
+ Project-URL: Documentation, https://github.com/aliyun/aliyun-log-memory-sdk/blob/master/usage.md
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.7
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: alibabacloud-sls20201230>=5.12.0
19
+ Dynamic: license-file
20
+
21
+ # SLS Memory SDK
22
+
23
+ 阿里云 SLS Memory 客户端 SDK。
24
+
25
+ ## 安装
26
+
27
+ ```bash
28
+ pip install sls-memory
29
+ ```
30
+
31
+ ## 快速开始
32
+
33
+ ```python
34
+ from sls_memory import Config, SLSMemoryClient
35
+
36
+ # 初始化客户端
37
+ config = Config(
38
+ access_key_id="your_access_key_id",
39
+ access_key_secret="your_access_key_secret",
40
+ endpoint="cn-hangzhou.log.aliyuncs.com"
41
+ )
42
+ client = SLSMemoryClient(
43
+ config,
44
+ project="my-project",
45
+ memory_store="my-store"
46
+ )
47
+
48
+ # 添加记忆
49
+ client.add("我喜欢打网球", user_id="user123")
50
+
51
+ # 搜索记忆
52
+ results = client.search("网球", user_id="user123")
53
+ print(results)
54
+ ```
55
+
56
+ ## 主要功能
57
+
58
+ - ✅ 兼容 mem0 SDK 接口
59
+ - ✅ 支持同步和异步客户端
60
+ - ✅ 支持记忆的增删改查
61
+ - ✅ 支持语义搜索和过滤
62
+ - ✅ 支持 Memory Store 管理
63
+
64
+ ## 文档
65
+
66
+ 详细使用文档请查看 [usage.md](https://github.com/aliyun/aliyun-log-memory-sdk/blob/master/usage.md)
67
+
@@ -0,0 +1,47 @@
1
+ # SLS Memory SDK
2
+
3
+ 阿里云 SLS Memory 客户端 SDK。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ pip install sls-memory
9
+ ```
10
+
11
+ ## 快速开始
12
+
13
+ ```python
14
+ from sls_memory import Config, SLSMemoryClient
15
+
16
+ # 初始化客户端
17
+ config = Config(
18
+ access_key_id="your_access_key_id",
19
+ access_key_secret="your_access_key_secret",
20
+ endpoint="cn-hangzhou.log.aliyuncs.com"
21
+ )
22
+ client = SLSMemoryClient(
23
+ config,
24
+ project="my-project",
25
+ memory_store="my-store"
26
+ )
27
+
28
+ # 添加记忆
29
+ client.add("我喜欢打网球", user_id="user123")
30
+
31
+ # 搜索记忆
32
+ results = client.search("网球", user_id="user123")
33
+ print(results)
34
+ ```
35
+
36
+ ## 主要功能
37
+
38
+ - ✅ 兼容 mem0 SDK 接口
39
+ - ✅ 支持同步和异步客户端
40
+ - ✅ 支持记忆的增删改查
41
+ - ✅ 支持语义搜索和过滤
42
+ - ✅ 支持 Memory Store 管理
43
+
44
+ ## 文档
45
+
46
+ 详细使用文档请查看 [usage.md](https://github.com/aliyun/aliyun-log-memory-sdk/blob/master/usage.md)
47
+
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "sls-memory"
7
+ dynamic = ["version"]
8
+ authors = [
9
+ {name = "Zhengqianyi"}
10
+ ]
11
+ description = "A mem0-compatible memory SDK powered by Alibaba Cloud SLS"
12
+ readme = "README.md"
13
+ requires-python = ">=3.7"
14
+ license = "MIT"
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3 :: Only",
20
+ "Operating System :: OS Independent",
21
+ ]
22
+ dependencies = [
23
+ "alibabacloud-sls20201230>=5.12.0",
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/aliyun/aliyun-log-memory-sdk"
28
+ Repository = "https://github.com/aliyun/aliyun-log-memory-sdk"
29
+ Documentation = "https://github.com/aliyun/aliyun-log-memory-sdk/blob/master/usage.md"
30
+
31
+ [tool.setuptools]
32
+ packages = ["sls_memory"]
33
+
34
+ [tool.setuptools.dynamic]
35
+ version = {attr = "sls_memory.__version__"}
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,47 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ SLS Memory SDK - A mem0-compatible memory SDK powered by Alibaba Cloud SLS.
4
+
5
+ This SDK provides an interface compatible with mem0 SDK, allowing users to
6
+ seamlessly migrate from mem0 to SLS Memory service.
7
+
8
+ Note:
9
+ Some mem0 parameters are not yet supported by SLS API. See COMPATIBILITY.md
10
+ for detailed differences between SLS Memory SDK and mem0 SDK.
11
+
12
+ Example:
13
+ >>> from sls_memory import SLSMemoryClient, Config
14
+ >>>
15
+ >>> # Initialize with AK/SK
16
+ >>> config = Config(
17
+ ... access_key_id="your_access_key_id",
18
+ ... access_key_secret="your_access_key_secret",
19
+ ... endpoint="cn-hangzhou.log.aliyuncs.com"
20
+ ... )
21
+ >>> client = SLSMemoryClient(config, project="my-project", memory_store="my-store")
22
+ >>>
23
+ >>> # Add a memory
24
+ >>> client.add("I love playing tennis", user_id="user123")
25
+ >>>
26
+ >>> # Search memories
27
+ >>> results = client.search("tennis", user_id="user123")
28
+ >>> print(results)
29
+ """
30
+
31
+ from sls_memory.client import SLSMemoryClient, AsyncSLSMemoryClient
32
+ from sls_memory.exceptions import ValidationError
33
+
34
+ # Re-export Config from alibabacloud_tea_openapi for convenience
35
+ from alibabacloud_tea_openapi.utils_models import Config
36
+
37
+ __all__ = [
38
+ # Clients
39
+ "SLSMemoryClient",
40
+ "AsyncSLSMemoryClient",
41
+ # Config
42
+ "Config",
43
+ # Exceptions (only for SDK internal validation)
44
+ "ValidationError",
45
+ ]
46
+
47
+ __version__ = "0.1.0"