supermemory 3.0.0a1__py3-none-any.whl → 3.0.0a2__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.
- supermemory/__init__.py +2 -1
- supermemory/_base_client.py +44 -2
- supermemory/_client.py +1 -9
- supermemory/_files.py +1 -1
- supermemory/_models.py +2 -0
- supermemory/_types.py +2 -0
- supermemory/_version.py +1 -1
- supermemory/resources/__init__.py +0 -14
- supermemory/resources/connections.py +30 -117
- supermemory/resources/memories.py +102 -230
- supermemory/resources/settings.py +47 -11
- supermemory/types/__init__.py +0 -9
- supermemory/types/connection_create_params.py +5 -3
- supermemory/types/connection_get_response.py +4 -0
- supermemory/types/memory_add_params.py +28 -0
- supermemory/types/memory_get_response.py +87 -1
- supermemory/types/memory_update_params.py +28 -0
- supermemory/types/setting_get_response.py +36 -2
- supermemory/types/setting_update_params.py +30 -6
- supermemory/types/setting_update_response.py +34 -8
- {supermemory-3.0.0a1.dist-info → supermemory-3.0.0a2.dist-info}/METADATA +44 -24
- supermemory-3.0.0a2.dist-info/RECORD +46 -0
- supermemory/resources/search.py +0 -296
- supermemory/types/connection_list_params.py +0 -13
- supermemory/types/connection_list_response.py +0 -25
- supermemory/types/memory_delete_response.py +0 -9
- supermemory/types/memory_list_params.py +0 -24
- supermemory/types/memory_list_response.py +0 -95
- supermemory/types/memory_upload_file_params.py +0 -13
- supermemory/types/memory_upload_file_response.py +0 -11
- supermemory/types/search_execute_params.py +0 -86
- supermemory/types/search_execute_response.py +0 -52
- supermemory-3.0.0a1.dist-info/RECORD +0 -56
- {supermemory-3.0.0a1.dist-info → supermemory-3.0.0a2.dist-info}/WHEEL +0 -0
- {supermemory-3.0.0a1.dist-info → supermemory-3.0.0a2.dist-info}/licenses/LICENSE +0 -0
@@ -16,6 +16,10 @@ class ConnectionGetResponse(BaseModel):
|
|
16
16
|
|
17
17
|
provider: str
|
18
18
|
|
19
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
20
|
+
|
21
|
+
email: Optional[str] = None
|
22
|
+
|
19
23
|
expires_at: Optional[float] = FieldInfo(alias="expiresAt", default=None)
|
20
24
|
|
21
25
|
metadata: Optional[Dict[str, object]] = None
|
@@ -12,7 +12,35 @@ __all__ = ["MemoryAddParams"]
|
|
12
12
|
|
13
13
|
class MemoryAddParams(TypedDict, total=False):
|
14
14
|
content: Required[str]
|
15
|
+
"""The content to extract and process into a memory.
|
16
|
+
|
17
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
18
|
+
|
19
|
+
Plaintext: Any plaintext format
|
20
|
+
|
21
|
+
URL: A URL to a website, PDF, image, or video
|
22
|
+
|
23
|
+
We automatically detect the content type from the url's response format.
|
24
|
+
"""
|
15
25
|
|
16
26
|
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
27
|
+
"""Optional tags this memory should be containerized by.
|
28
|
+
|
29
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
30
|
+
to use to group memories.
|
31
|
+
"""
|
32
|
+
|
33
|
+
custom_id: Annotated[str, PropertyInfo(alias="customId")]
|
34
|
+
"""Optional custom ID of the memory.
|
35
|
+
|
36
|
+
This could be an ID from your database that will uniquely identify this memory.
|
37
|
+
"""
|
17
38
|
|
18
39
|
metadata: Dict[str, Union[str, float, bool]]
|
40
|
+
"""Optional metadata for the memory.
|
41
|
+
|
42
|
+
This is used to store additional information about the memory. You can use this
|
43
|
+
to store any additional information you need about the memory. Metadata can be
|
44
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
45
|
+
strings, numbers, or booleans. You cannot nest objects.
|
46
|
+
"""
|
@@ -1,5 +1,11 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
from pydantic import Field as FieldInfo
|
8
|
+
|
3
9
|
from .._models import BaseModel
|
4
10
|
|
5
11
|
__all__ = ["MemoryGetResponse"]
|
@@ -7,5 +13,85 @@ __all__ = ["MemoryGetResponse"]
|
|
7
13
|
|
8
14
|
class MemoryGetResponse(BaseModel):
|
9
15
|
id: str
|
16
|
+
"""Unique identifier of the memory."""
|
17
|
+
|
18
|
+
connection_id: Optional[str] = FieldInfo(alias="connectionId", default=None)
|
19
|
+
"""Optional ID of connection the memory was created from.
|
20
|
+
|
21
|
+
This is useful for identifying the source of the memory.
|
22
|
+
"""
|
23
|
+
|
24
|
+
content: Optional[str] = None
|
25
|
+
"""The content to extract and process into a memory.
|
26
|
+
|
27
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
28
|
+
|
29
|
+
Plaintext: Any plaintext format
|
30
|
+
|
31
|
+
URL: A URL to a website, PDF, image, or video
|
32
|
+
|
33
|
+
We automatically detect the content type from the url's response format.
|
34
|
+
"""
|
35
|
+
|
36
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
37
|
+
"""Creation timestamp"""
|
38
|
+
|
39
|
+
custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
|
40
|
+
"""Optional custom ID of the memory.
|
41
|
+
|
42
|
+
This could be an ID from your database that will uniquely identify this memory.
|
43
|
+
"""
|
44
|
+
|
45
|
+
metadata: Union[str, float, bool, Dict[str, object], List[object], None] = None
|
46
|
+
"""Optional metadata for the memory.
|
47
|
+
|
48
|
+
This is used to store additional information about the memory. You can use this
|
49
|
+
to store any additional information you need about the memory. Metadata can be
|
50
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
51
|
+
strings, numbers, or booleans. You cannot nest objects.
|
52
|
+
"""
|
53
|
+
|
54
|
+
og_image: Optional[str] = FieldInfo(alias="ogImage", default=None)
|
55
|
+
|
56
|
+
source: Optional[str] = None
|
57
|
+
"""Source of the memory"""
|
58
|
+
|
59
|
+
status: Literal["unknown", "queued", "extracting", "chunking", "embedding", "indexing", "done", "failed"]
|
60
|
+
"""Status of the memory"""
|
61
|
+
|
62
|
+
summary: Optional[str] = None
|
63
|
+
"""Summary of the memory content"""
|
64
|
+
|
65
|
+
title: Optional[str] = None
|
66
|
+
"""Title of the memory"""
|
67
|
+
|
68
|
+
type: Literal[
|
69
|
+
"text",
|
70
|
+
"pdf",
|
71
|
+
"tweet",
|
72
|
+
"google_doc",
|
73
|
+
"google_slide",
|
74
|
+
"google_sheet",
|
75
|
+
"image",
|
76
|
+
"video",
|
77
|
+
"notion_doc",
|
78
|
+
"webpage",
|
79
|
+
"onedrive",
|
80
|
+
]
|
81
|
+
"""Type of the memory"""
|
82
|
+
|
83
|
+
updated_at: datetime = FieldInfo(alias="updatedAt")
|
84
|
+
"""Last update timestamp"""
|
85
|
+
|
86
|
+
url: Optional[str] = None
|
87
|
+
"""URL of the memory"""
|
88
|
+
|
89
|
+
container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
|
90
|
+
"""Optional tags this memory should be containerized by.
|
91
|
+
|
92
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
93
|
+
to use to group memories.
|
94
|
+
"""
|
10
95
|
|
11
|
-
|
96
|
+
raw: None = None
|
97
|
+
"""Raw content of the memory"""
|
@@ -12,7 +12,35 @@ __all__ = ["MemoryUpdateParams"]
|
|
12
12
|
|
13
13
|
class MemoryUpdateParams(TypedDict, total=False):
|
14
14
|
content: Required[str]
|
15
|
+
"""The content to extract and process into a memory.
|
16
|
+
|
17
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
18
|
+
|
19
|
+
Plaintext: Any plaintext format
|
20
|
+
|
21
|
+
URL: A URL to a website, PDF, image, or video
|
22
|
+
|
23
|
+
We automatically detect the content type from the url's response format.
|
24
|
+
"""
|
15
25
|
|
16
26
|
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
27
|
+
"""Optional tags this memory should be containerized by.
|
28
|
+
|
29
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
30
|
+
to use to group memories.
|
31
|
+
"""
|
32
|
+
|
33
|
+
custom_id: Annotated[str, PropertyInfo(alias="customId")]
|
34
|
+
"""Optional custom ID of the memory.
|
35
|
+
|
36
|
+
This could be an ID from your database that will uniquely identify this memory.
|
37
|
+
"""
|
17
38
|
|
18
39
|
metadata: Dict[str, Union[str, float, bool]]
|
40
|
+
"""Optional metadata for the memory.
|
41
|
+
|
42
|
+
This is used to store additional information about the memory. You can use this
|
43
|
+
to store any additional information you need about the memory. Metadata can be
|
44
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
45
|
+
strings, numbers, or booleans. You cannot nest objects.
|
46
|
+
"""
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import Dict
|
3
|
+
from typing import Dict, List, Union, Optional
|
4
|
+
|
5
|
+
from pydantic import Field as FieldInfo
|
4
6
|
|
5
7
|
from .._models import BaseModel
|
6
8
|
|
@@ -8,4 +10,36 @@ __all__ = ["SettingGetResponse"]
|
|
8
10
|
|
9
11
|
|
10
12
|
class SettingGetResponse(BaseModel):
|
11
|
-
|
13
|
+
exclude_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
14
|
+
alias="excludeItems", default=None
|
15
|
+
)
|
16
|
+
|
17
|
+
filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)
|
18
|
+
|
19
|
+
filter_tags: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
20
|
+
alias="filterTags", default=None
|
21
|
+
)
|
22
|
+
|
23
|
+
google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)
|
24
|
+
|
25
|
+
google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
|
26
|
+
|
27
|
+
google_drive_custom_key_enabled: Optional[bool] = FieldInfo(alias="googleDriveCustomKeyEnabled", default=None)
|
28
|
+
|
29
|
+
include_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
30
|
+
alias="includeItems", default=None
|
31
|
+
)
|
32
|
+
|
33
|
+
notion_client_id: Optional[str] = FieldInfo(alias="notionClientId", default=None)
|
34
|
+
|
35
|
+
notion_client_secret: Optional[str] = FieldInfo(alias="notionClientSecret", default=None)
|
36
|
+
|
37
|
+
notion_custom_key_enabled: Optional[bool] = FieldInfo(alias="notionCustomKeyEnabled", default=None)
|
38
|
+
|
39
|
+
onedrive_client_id: Optional[str] = FieldInfo(alias="onedriveClientId", default=None)
|
40
|
+
|
41
|
+
onedrive_client_secret: Optional[str] = FieldInfo(alias="onedriveClientSecret", default=None)
|
42
|
+
|
43
|
+
onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)
|
44
|
+
|
45
|
+
should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from typing import Dict,
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
6
6
|
from typing_extensions import Annotated, TypedDict
|
7
7
|
|
8
8
|
from .._utils import PropertyInfo
|
@@ -11,12 +11,36 @@ __all__ = ["SettingUpdateParams"]
|
|
11
11
|
|
12
12
|
|
13
13
|
class SettingUpdateParams(TypedDict, total=False):
|
14
|
-
exclude_items: Annotated[
|
14
|
+
exclude_items: Annotated[
|
15
|
+
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="excludeItems")
|
16
|
+
]
|
15
17
|
|
16
|
-
filter_prompt: Annotated[str, PropertyInfo(alias="filterPrompt")]
|
18
|
+
filter_prompt: Annotated[Optional[str], PropertyInfo(alias="filterPrompt")]
|
17
19
|
|
18
|
-
filter_tags: Annotated[
|
20
|
+
filter_tags: Annotated[
|
21
|
+
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="filterTags")
|
22
|
+
]
|
19
23
|
|
20
|
-
|
24
|
+
google_drive_client_id: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientId")]
|
21
25
|
|
22
|
-
|
26
|
+
google_drive_client_secret: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientSecret")]
|
27
|
+
|
28
|
+
google_drive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="googleDriveCustomKeyEnabled")]
|
29
|
+
|
30
|
+
include_items: Annotated[
|
31
|
+
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="includeItems")
|
32
|
+
]
|
33
|
+
|
34
|
+
notion_client_id: Annotated[Optional[str], PropertyInfo(alias="notionClientId")]
|
35
|
+
|
36
|
+
notion_client_secret: Annotated[Optional[str], PropertyInfo(alias="notionClientSecret")]
|
37
|
+
|
38
|
+
notion_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="notionCustomKeyEnabled")]
|
39
|
+
|
40
|
+
onedrive_client_id: Annotated[Optional[str], PropertyInfo(alias="onedriveClientId")]
|
41
|
+
|
42
|
+
onedrive_client_secret: Annotated[Optional[str], PropertyInfo(alias="onedriveClientSecret")]
|
43
|
+
|
44
|
+
onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")]
|
45
|
+
|
46
|
+
should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")]
|
@@ -1,27 +1,53 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import Dict, List, Optional
|
3
|
+
from typing import Dict, List, Union, Optional
|
4
4
|
|
5
5
|
from pydantic import Field as FieldInfo
|
6
6
|
|
7
7
|
from .._models import BaseModel
|
8
8
|
|
9
|
-
__all__ = ["SettingUpdateResponse", "
|
9
|
+
__all__ = ["SettingUpdateResponse", "Updated"]
|
10
10
|
|
11
11
|
|
12
|
-
class
|
13
|
-
exclude_items:
|
12
|
+
class Updated(BaseModel):
|
13
|
+
exclude_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
14
|
+
alias="excludeItems", default=None
|
15
|
+
)
|
14
16
|
|
15
17
|
filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)
|
16
18
|
|
17
|
-
filter_tags:
|
19
|
+
filter_tags: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
20
|
+
alias="filterTags", default=None
|
21
|
+
)
|
18
22
|
|
19
|
-
|
23
|
+
google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)
|
24
|
+
|
25
|
+
google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
|
26
|
+
|
27
|
+
google_drive_custom_key_enabled: Optional[bool] = FieldInfo(alias="googleDriveCustomKeyEnabled", default=None)
|
28
|
+
|
29
|
+
include_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
30
|
+
alias="includeItems", default=None
|
31
|
+
)
|
32
|
+
|
33
|
+
notion_client_id: Optional[str] = FieldInfo(alias="notionClientId", default=None)
|
34
|
+
|
35
|
+
notion_client_secret: Optional[str] = FieldInfo(alias="notionClientSecret", default=None)
|
36
|
+
|
37
|
+
notion_custom_key_enabled: Optional[bool] = FieldInfo(alias="notionCustomKeyEnabled", default=None)
|
38
|
+
|
39
|
+
onedrive_client_id: Optional[str] = FieldInfo(alias="onedriveClientId", default=None)
|
40
|
+
|
41
|
+
onedrive_client_secret: Optional[str] = FieldInfo(alias="onedriveClientSecret", default=None)
|
42
|
+
|
43
|
+
onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)
|
20
44
|
|
21
45
|
should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)
|
22
46
|
|
23
47
|
|
24
48
|
class SettingUpdateResponse(BaseModel):
|
25
|
-
|
49
|
+
org_id: str = FieldInfo(alias="orgId")
|
50
|
+
|
51
|
+
org_slug: str = FieldInfo(alias="orgSlug")
|
26
52
|
|
27
|
-
|
53
|
+
updated: Updated
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: supermemory
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.0a2
|
4
4
|
Summary: The official Python library for the supermemory API
|
5
5
|
Project-URL: Homepage, https://github.com/supermemoryai/python-sdk
|
6
6
|
Project-URL: Repository, https://github.com/supermemoryai/python-sdk
|
@@ -27,11 +27,14 @@ Requires-Dist: httpx<1,>=0.23.0
|
|
27
27
|
Requires-Dist: pydantic<3,>=1.9.0
|
28
28
|
Requires-Dist: sniffio
|
29
29
|
Requires-Dist: typing-extensions<5,>=4.10
|
30
|
+
Provides-Extra: aiohttp
|
31
|
+
Requires-Dist: aiohttp; extra == 'aiohttp'
|
32
|
+
Requires-Dist: httpx-aiohttp>=0.1.6; extra == 'aiohttp'
|
30
33
|
Description-Content-Type: text/markdown
|
31
34
|
|
32
35
|
# Supermemory Python API library
|
33
36
|
|
34
|
-
[](https://pypi.org/project/supermemory/)
|
37
|
+
[>)](https://pypi.org/project/supermemory/)
|
35
38
|
|
36
39
|
The Supermemory Python library provides convenient access to the Supermemory REST API from any Python 3.8+
|
37
40
|
application. The library includes type definitions for all request params and response fields,
|
@@ -62,10 +65,10 @@ client = Supermemory(
|
|
62
65
|
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
|
63
66
|
)
|
64
67
|
|
65
|
-
response = client.
|
66
|
-
|
68
|
+
response = client.memories.add(
|
69
|
+
content="This is a detailed article about machine learning concepts...",
|
67
70
|
)
|
68
|
-
print(response.
|
71
|
+
print(response.id)
|
69
72
|
```
|
70
73
|
|
71
74
|
While you can provide an `api_key` keyword argument,
|
@@ -88,10 +91,10 @@ client = AsyncSupermemory(
|
|
88
91
|
|
89
92
|
|
90
93
|
async def main() -> None:
|
91
|
-
response = await client.
|
92
|
-
|
94
|
+
response = await client.memories.add(
|
95
|
+
content="This is a detailed article about machine learning concepts...",
|
93
96
|
)
|
94
|
-
print(response.
|
97
|
+
print(response.id)
|
95
98
|
|
96
99
|
|
97
100
|
asyncio.run(main())
|
@@ -99,31 +102,48 @@ asyncio.run(main())
|
|
99
102
|
|
100
103
|
Functionality between the synchronous and asynchronous clients is otherwise identical.
|
101
104
|
|
102
|
-
|
103
|
-
|
104
|
-
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
|
105
|
+
### With aiohttp
|
105
106
|
|
106
|
-
|
107
|
-
- Converting to a dictionary, `model.to_dict()`
|
107
|
+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
|
108
108
|
|
109
|
-
|
109
|
+
You can enable this by installing `aiohttp`:
|
110
110
|
|
111
|
-
|
111
|
+
```sh
|
112
|
+
# install from PyPI
|
113
|
+
pip install --pre supermemory[aiohttp]
|
114
|
+
```
|
112
115
|
|
113
|
-
|
116
|
+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
114
117
|
|
115
118
|
```python
|
116
|
-
|
117
|
-
|
119
|
+
import os
|
120
|
+
import asyncio
|
121
|
+
from supermemory import DefaultAioHttpClient
|
122
|
+
from supermemory import AsyncSupermemory
|
118
123
|
|
119
|
-
client = Supermemory()
|
120
124
|
|
121
|
-
|
122
|
-
|
123
|
-
)
|
125
|
+
async def main() -> None:
|
126
|
+
async with AsyncSupermemory(
|
127
|
+
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
|
128
|
+
http_client=DefaultAioHttpClient(),
|
129
|
+
) as client:
|
130
|
+
response = await client.memories.add(
|
131
|
+
content="This is a detailed article about machine learning concepts...",
|
132
|
+
)
|
133
|
+
print(response.id)
|
134
|
+
|
135
|
+
|
136
|
+
asyncio.run(main())
|
124
137
|
```
|
125
138
|
|
126
|
-
|
139
|
+
## Using types
|
140
|
+
|
141
|
+
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
|
142
|
+
|
143
|
+
- Serializing back into JSON, `model.to_json()`
|
144
|
+
- Converting to a dictionary, `model.to_dict()`
|
145
|
+
|
146
|
+
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
|
127
147
|
|
128
148
|
## Handling errors
|
129
149
|
|
@@ -194,7 +214,7 @@ client.with_options(max_retries=5).memories.add(
|
|
194
214
|
### Timeouts
|
195
215
|
|
196
216
|
By default requests time out after 1 minute. You can configure this with a `timeout` option,
|
197
|
-
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
|
217
|
+
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
198
218
|
|
199
219
|
```python
|
200
220
|
from supermemory import Supermemory
|
@@ -0,0 +1,46 @@
|
|
1
|
+
supermemory/__init__.py,sha256=PDWpv0_OWO8lBFh21lQl5k0zrlBzcGf643CKXRoQgzM,2664
|
2
|
+
supermemory/_base_client.py,sha256=r19iD2PFXhH75y9v6TNYPwd5NdYjZj3shFhuUnHZqlU,66720
|
3
|
+
supermemory/_client.py,sha256=IMo1vJ8G5Ha05IPVyuUEFXrCOY83gKJGB6sdyAb-rUk,16388
|
4
|
+
supermemory/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
|
+
supermemory/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
6
|
+
supermemory/_exceptions.py,sha256=5nnX7W8L_eA6LkX3SBl7csJy5d9QEcDqRVuwDq8wVh8,3230
|
7
|
+
supermemory/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
|
8
|
+
supermemory/_models.py,sha256=G1vczEodX0vUySeVKbF-mbzlaObNL1oVAYH4c65agRk,29131
|
9
|
+
supermemory/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
10
|
+
supermemory/_resource.py,sha256=_wuaB1exMy-l-qqdJJdTv15hH5qBSN2Rj9CFwjXTZJU,1130
|
11
|
+
supermemory/_response.py,sha256=Yh869-U8INkojKZHFsNw69z5Y2BrK2isgRJ8mifEURM,28848
|
12
|
+
supermemory/_streaming.py,sha256=MGbosxSTqq0_JG52hvH2Z-Mr_Y95ws5UdFw77_iYukc,10120
|
13
|
+
supermemory/_types.py,sha256=ohS8PFDHBFM-0ua6YsUlS55BPHft3xY6DhiIKaYrlN0,6202
|
14
|
+
supermemory/_version.py,sha256=DjAIaWTz347eKyBKuH3jzyz6mfi63Q9mefpND-W6XbY,171
|
15
|
+
supermemory/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
+
supermemory/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
|
+
supermemory/_utils/_logs.py,sha256=iceljYaEUb4Q4q1SgbSzwSrlJA64ISbaccczzZ8Z9Vg,789
|
18
|
+
supermemory/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
19
|
+
supermemory/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
20
|
+
supermemory/_utils/_resources_proxy.py,sha256=9MqlmhIEoyeVraNz90vnq1pS6EOxSqvYVlVK-CvLMmQ,614
|
21
|
+
supermemory/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
22
|
+
supermemory/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
23
|
+
supermemory/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
|
24
|
+
supermemory/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
25
|
+
supermemory/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
26
|
+
supermemory/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
27
|
+
supermemory/resources/__init__.py,sha256=iYwzfeiqmu2Lorat88bYVkp4CobBt60Gq_6GcygldLE,1569
|
28
|
+
supermemory/resources/connections.py,sha256=PERpnnUiu2hQjDvX_toy1thiipXu25RQaahTIeUwb3w,10656
|
29
|
+
supermemory/resources/memories.py,sha256=yUR8DBlJxp-1G-TIFXNyDZxdLdG-P1-c-k297JbPgUg,21235
|
30
|
+
supermemory/resources/settings.py,sha256=hzijwhQ9U_W5zDRbDjW27QdQU4CwqLkPRWkcALYSCok,12175
|
31
|
+
supermemory/types/__init__.py,sha256=RUzJ7f0cZIPrg4CtIO6SRTpu_tEUrQzjGTrnzl2k0y4,990
|
32
|
+
supermemory/types/connection_create_params.py,sha256=bYYKu3ns60PX6Mt34UQUpYwThB3SBZsKn5tW0c46DUM,630
|
33
|
+
supermemory/types/connection_create_response.py,sha256=i4sb0DSRs7wVVd8xDBOtr7vw-YbaeZ7MydlQLYvlvJs,468
|
34
|
+
supermemory/types/connection_get_response.py,sha256=9ujakZecSs89sItCpsyDQWWB59BtymxspKQKVJBofIg,606
|
35
|
+
supermemory/types/memory_add_params.py,sha256=QG_aD0YXTJ8aSzwlKkv18nkrzl3asUakfFfR65mk9ss,1528
|
36
|
+
supermemory/types/memory_add_response.py,sha256=5lim8sVXM7WzG8tUuKORHEe2lJc6yVWvyjylzNsLGjw,219
|
37
|
+
supermemory/types/memory_get_response.py,sha256=sSCvX54IIoaVuifygi0IxiwHMKNNIGgg8eJJ-xu37BI,2850
|
38
|
+
supermemory/types/memory_update_params.py,sha256=swEIF-CfcxWGzsiT8O_AbtzkyujMiafZpbi2GEXPuuw,1534
|
39
|
+
supermemory/types/memory_update_response.py,sha256=fvfO9lGM8xv2EUOQfOSxqig6fx6-ykq7syW69er_2ng,225
|
40
|
+
supermemory/types/setting_get_response.py,sha256=_CWSr9_-0alw57qSQOaMm-e_FsdXmxIRYhcmTMpdado,1789
|
41
|
+
supermemory/types/setting_update_params.py,sha256=EWbqdSsoTJohQ1nbEbBdAvtR5co_hh7huH6XZ-t7MRM,1854
|
42
|
+
supermemory/types/setting_update_response.py,sha256=Evd1U6QQDYyhD_hpKqS9k7ctvh0GNX4GHPdwBChVB44,1947
|
43
|
+
supermemory-3.0.0a2.dist-info/METADATA,sha256=-eB-dUw_U1qP97DHMd44NppIToCRka4IZiphMdzOGiU,14364
|
44
|
+
supermemory-3.0.0a2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
45
|
+
supermemory-3.0.0a2.dist-info/licenses/LICENSE,sha256=M2NcpYEBpakciOULpWzo-xO2Lincf74gGwfaU00Sct0,11341
|
46
|
+
supermemory-3.0.0a2.dist-info/RECORD,,
|