supermemory 3.0.0a21__tar.gz → 3.0.0a22__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.
Potentially problematic release.
This version of supermemory might be problematic. Click here for more details.
- supermemory-3.0.0a22/.release-please-manifest.json +3 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/CHANGELOG.md +8 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/CONTRIBUTING.md +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/PKG-INFO +22 -22
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/README.md +21 -21
- supermemory-3.0.0a22/api.md +72 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/mypy.ini +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/pyproject.toml +5 -5
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/release-please-config.json +1 -1
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/__init__.py +2 -2
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_base_client.py +1 -1
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_response.py +4 -4
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_types.py +1 -1
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_logs.py +2 -2
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_resources_proxy.py +4 -4
- supermemory-3.0.0a22/src/supermemory/_version.py +4 -0
- supermemory-3.0.0a22/src/supermemory_new/lib/.keep +4 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/api_resources/test_connections.py +2 -2
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/api_resources/test_memories.py +2 -2
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/api_resources/test_search.py +2 -2
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/api_resources/test_settings.py +2 -2
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/conftest.py +3 -3
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_client.py +23 -23
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_deepcopy.py +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_extract_files.py +2 -2
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_files.py +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_models.py +3 -3
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_qs.py +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_required_args.py +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_response.py +7 -7
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_streaming.py +2 -2
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_transform.py +4 -4
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_utils/test_proxy.py +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/test_utils/test_typing.py +1 -1
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/utils.py +4 -4
- supermemory-3.0.0a21/.release-please-manifest.json +0 -3
- supermemory-3.0.0a21/api.md +0 -72
- supermemory-3.0.0a21/src/supermemory_new/_version.py +0 -4
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/.gitignore +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/LICENSE +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/SECURITY.md +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/bin/check-release-environment +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/bin/publish-pypi +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/examples/.keep +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/noxfile.py +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/requirements-dev.lock +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/requirements.lock +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_client.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_compat.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_constants.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_exceptions.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_files.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_models.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_qs.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_resource.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_streaming.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/__init__.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_proxy.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_reflection.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_streams.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_sync.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_transform.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_typing.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_utils.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/lib/.keep +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/py.typed +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/resources/__init__.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/resources/connections.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/resources/memories.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/resources/search.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/resources/settings.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/__init__.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_create_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_create_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_delete_by_id_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_delete_by_provider_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_delete_by_provider_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_get_by_id_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_get_by_tags_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_get_by_tags_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_import_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_list_documents_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_list_documents_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_list_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/connection_list_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_add_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_add_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_get_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_list_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_list_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_update_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/memory_update_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/search_execute_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/search_execute_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/setting_get_response.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/setting_update_params.py +0 -0
- {supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/types/setting_update_response.py +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/__init__.py +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/api_resources/__init__.py +0 -0
- {supermemory-3.0.0a21 → supermemory-3.0.0a22}/tests/sample_file.txt +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.0-alpha.22 (2025-07-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v3.0.0-alpha.21...v3.0.0-alpha.22](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.21...v3.0.0-alpha.22)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([2a863a1](https://github.com/supermemoryai/python-sdk/commit/2a863a166b5c39208ef910d84530a27898ed0c71))
|
|
10
|
+
|
|
3
11
|
## 3.0.0-alpha.21 (2025-07-03)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v3.0.0-alpha.20...v3.0.0-alpha.21](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.20...v3.0.0-alpha.21)
|
|
@@ -36,7 +36,7 @@ $ pip install -r requirements-dev.lock
|
|
|
36
36
|
|
|
37
37
|
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
|
|
38
38
|
result in merge conflicts between manual patches and changes from the generator. The generator will never
|
|
39
|
-
modify the contents of the `src/
|
|
39
|
+
modify the contents of the `src/supermemory/lib/` and `examples/` directories.
|
|
40
40
|
|
|
41
41
|
## Adding and running examples
|
|
42
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: supermemory
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0a22
|
|
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
|
|
@@ -59,7 +59,7 @@ The full API of this library can be found in [api.md](https://github.com/superme
|
|
|
59
59
|
|
|
60
60
|
```python
|
|
61
61
|
import os
|
|
62
|
-
from
|
|
62
|
+
from supermemory import Supermemory
|
|
63
63
|
|
|
64
64
|
client = Supermemory(
|
|
65
65
|
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
|
|
@@ -83,7 +83,7 @@ Simply import `AsyncSupermemory` instead of `Supermemory` and use `await` with e
|
|
|
83
83
|
```python
|
|
84
84
|
import os
|
|
85
85
|
import asyncio
|
|
86
|
-
from
|
|
86
|
+
from supermemory import AsyncSupermemory
|
|
87
87
|
|
|
88
88
|
client = AsyncSupermemory(
|
|
89
89
|
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
|
|
@@ -118,8 +118,8 @@ Then you can enable it by instantiating the client with `http_client=DefaultAioH
|
|
|
118
118
|
```python
|
|
119
119
|
import os
|
|
120
120
|
import asyncio
|
|
121
|
-
from
|
|
122
|
-
from
|
|
121
|
+
from supermemory import DefaultAioHttpClient
|
|
122
|
+
from supermemory import AsyncSupermemory
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
async def main() -> None:
|
|
@@ -147,16 +147,16 @@ Typed requests and responses provide autocomplete and documentation within your
|
|
|
147
147
|
|
|
148
148
|
## Handling errors
|
|
149
149
|
|
|
150
|
-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `
|
|
150
|
+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `supermemory.APIConnectionError` is raised.
|
|
151
151
|
|
|
152
152
|
When the API returns a non-success status code (that is, 4xx or 5xx
|
|
153
|
-
response), a subclass of `
|
|
153
|
+
response), a subclass of `supermemory.APIStatusError` is raised, containing `status_code` and `response` properties.
|
|
154
154
|
|
|
155
|
-
All errors inherit from `
|
|
155
|
+
All errors inherit from `supermemory.APIError`.
|
|
156
156
|
|
|
157
157
|
```python
|
|
158
|
-
import
|
|
159
|
-
from
|
|
158
|
+
import supermemory
|
|
159
|
+
from supermemory import Supermemory
|
|
160
160
|
|
|
161
161
|
client = Supermemory()
|
|
162
162
|
|
|
@@ -164,12 +164,12 @@ try:
|
|
|
164
164
|
client.memories.add(
|
|
165
165
|
content="This is a detailed article about machine learning concepts...",
|
|
166
166
|
)
|
|
167
|
-
except
|
|
167
|
+
except supermemory.APIConnectionError as e:
|
|
168
168
|
print("The server could not be reached")
|
|
169
169
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
170
|
-
except
|
|
170
|
+
except supermemory.RateLimitError as e:
|
|
171
171
|
print("A 429 status code was received; we should back off a bit.")
|
|
172
|
-
except
|
|
172
|
+
except supermemory.APIStatusError as e:
|
|
173
173
|
print("Another non-200-range status code was received")
|
|
174
174
|
print(e.status_code)
|
|
175
175
|
print(e.response)
|
|
@@ -197,7 +197,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
|
|
|
197
197
|
You can use the `max_retries` option to configure or disable retry settings:
|
|
198
198
|
|
|
199
199
|
```python
|
|
200
|
-
from
|
|
200
|
+
from supermemory import Supermemory
|
|
201
201
|
|
|
202
202
|
# Configure the default for all requests:
|
|
203
203
|
client = Supermemory(
|
|
@@ -217,7 +217,7 @@ By default requests time out after 1 minute. You can configure this with a `time
|
|
|
217
217
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
|
218
218
|
|
|
219
219
|
```python
|
|
220
|
-
from
|
|
220
|
+
from supermemory import Supermemory
|
|
221
221
|
|
|
222
222
|
# Configure the default for all requests:
|
|
223
223
|
client = Supermemory(
|
|
@@ -271,7 +271,7 @@ if response.my_field is None:
|
|
|
271
271
|
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
|
|
272
272
|
|
|
273
273
|
```py
|
|
274
|
-
from
|
|
274
|
+
from supermemory import Supermemory
|
|
275
275
|
|
|
276
276
|
client = Supermemory()
|
|
277
277
|
response = client.memories.with_raw_response.add(
|
|
@@ -283,9 +283,9 @@ memory = response.parse() # get the object that `memories.add()` would have ret
|
|
|
283
283
|
print(memory.id)
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
These methods return an [`APIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/
|
|
286
|
+
These methods return an [`APIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) object.
|
|
287
287
|
|
|
288
|
-
The async client returns an [`AsyncAPIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/
|
|
288
|
+
The async client returns an [`AsyncAPIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
|
|
289
289
|
|
|
290
290
|
#### `.with_streaming_response`
|
|
291
291
|
|
|
@@ -349,7 +349,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
|
|
|
349
349
|
|
|
350
350
|
```python
|
|
351
351
|
import httpx
|
|
352
|
-
from
|
|
352
|
+
from supermemory import Supermemory, DefaultHttpxClient
|
|
353
353
|
|
|
354
354
|
client = Supermemory(
|
|
355
355
|
# Or use the `SUPERMEMORY_BASE_URL` env var
|
|
@@ -372,7 +372,7 @@ client.with_options(http_client=DefaultHttpxClient(...))
|
|
|
372
372
|
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
|
|
373
373
|
|
|
374
374
|
```py
|
|
375
|
-
from
|
|
375
|
+
from supermemory import Supermemory
|
|
376
376
|
|
|
377
377
|
with Supermemory() as client:
|
|
378
378
|
# make requests here
|
|
@@ -400,8 +400,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
|
|
|
400
400
|
You can determine the version that is being used at runtime with:
|
|
401
401
|
|
|
402
402
|
```py
|
|
403
|
-
import
|
|
404
|
-
print(
|
|
403
|
+
import supermemory
|
|
404
|
+
print(supermemory.__version__)
|
|
405
405
|
```
|
|
406
406
|
|
|
407
407
|
## Requirements
|
|
@@ -25,7 +25,7 @@ The full API of this library can be found in [api.md](api.md).
|
|
|
25
25
|
|
|
26
26
|
```python
|
|
27
27
|
import os
|
|
28
|
-
from
|
|
28
|
+
from supermemory import Supermemory
|
|
29
29
|
|
|
30
30
|
client = Supermemory(
|
|
31
31
|
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
|
|
@@ -49,7 +49,7 @@ Simply import `AsyncSupermemory` instead of `Supermemory` and use `await` with e
|
|
|
49
49
|
```python
|
|
50
50
|
import os
|
|
51
51
|
import asyncio
|
|
52
|
-
from
|
|
52
|
+
from supermemory import AsyncSupermemory
|
|
53
53
|
|
|
54
54
|
client = AsyncSupermemory(
|
|
55
55
|
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
|
|
@@ -84,8 +84,8 @@ Then you can enable it by instantiating the client with `http_client=DefaultAioH
|
|
|
84
84
|
```python
|
|
85
85
|
import os
|
|
86
86
|
import asyncio
|
|
87
|
-
from
|
|
88
|
-
from
|
|
87
|
+
from supermemory import DefaultAioHttpClient
|
|
88
|
+
from supermemory import AsyncSupermemory
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
async def main() -> None:
|
|
@@ -113,16 +113,16 @@ Typed requests and responses provide autocomplete and documentation within your
|
|
|
113
113
|
|
|
114
114
|
## Handling errors
|
|
115
115
|
|
|
116
|
-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `
|
|
116
|
+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `supermemory.APIConnectionError` is raised.
|
|
117
117
|
|
|
118
118
|
When the API returns a non-success status code (that is, 4xx or 5xx
|
|
119
|
-
response), a subclass of `
|
|
119
|
+
response), a subclass of `supermemory.APIStatusError` is raised, containing `status_code` and `response` properties.
|
|
120
120
|
|
|
121
|
-
All errors inherit from `
|
|
121
|
+
All errors inherit from `supermemory.APIError`.
|
|
122
122
|
|
|
123
123
|
```python
|
|
124
|
-
import
|
|
125
|
-
from
|
|
124
|
+
import supermemory
|
|
125
|
+
from supermemory import Supermemory
|
|
126
126
|
|
|
127
127
|
client = Supermemory()
|
|
128
128
|
|
|
@@ -130,12 +130,12 @@ try:
|
|
|
130
130
|
client.memories.add(
|
|
131
131
|
content="This is a detailed article about machine learning concepts...",
|
|
132
132
|
)
|
|
133
|
-
except
|
|
133
|
+
except supermemory.APIConnectionError as e:
|
|
134
134
|
print("The server could not be reached")
|
|
135
135
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
136
|
-
except
|
|
136
|
+
except supermemory.RateLimitError as e:
|
|
137
137
|
print("A 429 status code was received; we should back off a bit.")
|
|
138
|
-
except
|
|
138
|
+
except supermemory.APIStatusError as e:
|
|
139
139
|
print("Another non-200-range status code was received")
|
|
140
140
|
print(e.status_code)
|
|
141
141
|
print(e.response)
|
|
@@ -163,7 +163,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
|
|
|
163
163
|
You can use the `max_retries` option to configure or disable retry settings:
|
|
164
164
|
|
|
165
165
|
```python
|
|
166
|
-
from
|
|
166
|
+
from supermemory import Supermemory
|
|
167
167
|
|
|
168
168
|
# Configure the default for all requests:
|
|
169
169
|
client = Supermemory(
|
|
@@ -183,7 +183,7 @@ By default requests time out after 1 minute. You can configure this with a `time
|
|
|
183
183
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
|
184
184
|
|
|
185
185
|
```python
|
|
186
|
-
from
|
|
186
|
+
from supermemory import Supermemory
|
|
187
187
|
|
|
188
188
|
# Configure the default for all requests:
|
|
189
189
|
client = Supermemory(
|
|
@@ -237,7 +237,7 @@ if response.my_field is None:
|
|
|
237
237
|
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
|
|
238
238
|
|
|
239
239
|
```py
|
|
240
|
-
from
|
|
240
|
+
from supermemory import Supermemory
|
|
241
241
|
|
|
242
242
|
client = Supermemory()
|
|
243
243
|
response = client.memories.with_raw_response.add(
|
|
@@ -249,9 +249,9 @@ memory = response.parse() # get the object that `memories.add()` would have ret
|
|
|
249
249
|
print(memory.id)
|
|
250
250
|
```
|
|
251
251
|
|
|
252
|
-
These methods return an [`APIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/
|
|
252
|
+
These methods return an [`APIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) object.
|
|
253
253
|
|
|
254
|
-
The async client returns an [`AsyncAPIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/
|
|
254
|
+
The async client returns an [`AsyncAPIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
|
|
255
255
|
|
|
256
256
|
#### `.with_streaming_response`
|
|
257
257
|
|
|
@@ -315,7 +315,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
|
|
|
315
315
|
|
|
316
316
|
```python
|
|
317
317
|
import httpx
|
|
318
|
-
from
|
|
318
|
+
from supermemory import Supermemory, DefaultHttpxClient
|
|
319
319
|
|
|
320
320
|
client = Supermemory(
|
|
321
321
|
# Or use the `SUPERMEMORY_BASE_URL` env var
|
|
@@ -338,7 +338,7 @@ client.with_options(http_client=DefaultHttpxClient(...))
|
|
|
338
338
|
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
|
|
339
339
|
|
|
340
340
|
```py
|
|
341
|
-
from
|
|
341
|
+
from supermemory import Supermemory
|
|
342
342
|
|
|
343
343
|
with Supermemory() as client:
|
|
344
344
|
# make requests here
|
|
@@ -366,8 +366,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
|
|
|
366
366
|
You can determine the version that is being used at runtime with:
|
|
367
367
|
|
|
368
368
|
```py
|
|
369
|
-
import
|
|
370
|
-
print(
|
|
369
|
+
import supermemory
|
|
370
|
+
print(supermemory.__version__)
|
|
371
371
|
```
|
|
372
372
|
|
|
373
373
|
## Requirements
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Memories
|
|
2
|
+
|
|
3
|
+
Types:
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from supermemory.types import (
|
|
7
|
+
MemoryUpdateResponse,
|
|
8
|
+
MemoryListResponse,
|
|
9
|
+
MemoryAddResponse,
|
|
10
|
+
MemoryGetResponse,
|
|
11
|
+
)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Methods:
|
|
15
|
+
|
|
16
|
+
- <code title="patch /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">update</a>(id, \*\*<a href="src/supermemory/types/memory_update_params.py">params</a>) -> <a href="./src/supermemory/types/memory_update_response.py">MemoryUpdateResponse</a></code>
|
|
17
|
+
- <code title="post /v3/memories/list">client.memories.<a href="./src/supermemory/resources/memories.py">list</a>(\*\*<a href="src/supermemory/types/memory_list_params.py">params</a>) -> <a href="./src/supermemory/types/memory_list_response.py">MemoryListResponse</a></code>
|
|
18
|
+
- <code title="delete /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">delete</a>(id) -> None</code>
|
|
19
|
+
- <code title="post /v3/memories">client.memories.<a href="./src/supermemory/resources/memories.py">add</a>(\*\*<a href="src/supermemory/types/memory_add_params.py">params</a>) -> <a href="./src/supermemory/types/memory_add_response.py">MemoryAddResponse</a></code>
|
|
20
|
+
- <code title="get /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">get</a>(id) -> <a href="./src/supermemory/types/memory_get_response.py">MemoryGetResponse</a></code>
|
|
21
|
+
|
|
22
|
+
# Search
|
|
23
|
+
|
|
24
|
+
Types:
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from supermemory.types import SearchExecuteResponse
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Methods:
|
|
31
|
+
|
|
32
|
+
- <code title="post /v3/search">client.search.<a href="./src/supermemory/resources/search.py">execute</a>(\*\*<a href="src/supermemory/types/search_execute_params.py">params</a>) -> <a href="./src/supermemory/types/search_execute_response.py">SearchExecuteResponse</a></code>
|
|
33
|
+
|
|
34
|
+
# Settings
|
|
35
|
+
|
|
36
|
+
Types:
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from supermemory.types import SettingUpdateResponse, SettingGetResponse
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Methods:
|
|
43
|
+
|
|
44
|
+
- <code title="patch /v3/settings">client.settings.<a href="./src/supermemory/resources/settings.py">update</a>(\*\*<a href="src/supermemory/types/setting_update_params.py">params</a>) -> <a href="./src/supermemory/types/setting_update_response.py">SettingUpdateResponse</a></code>
|
|
45
|
+
- <code title="get /v3/settings">client.settings.<a href="./src/supermemory/resources/settings.py">get</a>() -> <a href="./src/supermemory/types/setting_get_response.py">SettingGetResponse</a></code>
|
|
46
|
+
|
|
47
|
+
# Connections
|
|
48
|
+
|
|
49
|
+
Types:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from supermemory.types import (
|
|
53
|
+
ConnectionCreateResponse,
|
|
54
|
+
ConnectionListResponse,
|
|
55
|
+
ConnectionDeleteByIDResponse,
|
|
56
|
+
ConnectionDeleteByProviderResponse,
|
|
57
|
+
ConnectionGetByIDResponse,
|
|
58
|
+
ConnectionGetByTagsResponse,
|
|
59
|
+
ConnectionListDocumentsResponse,
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Methods:
|
|
64
|
+
|
|
65
|
+
- <code title="post /v3/connections/{provider}">client.connections.<a href="./src/supermemory/resources/connections.py">create</a>(provider, \*\*<a href="src/supermemory/types/connection_create_params.py">params</a>) -> <a href="./src/supermemory/types/connection_create_response.py">ConnectionCreateResponse</a></code>
|
|
66
|
+
- <code title="post /v3/connections/list">client.connections.<a href="./src/supermemory/resources/connections.py">list</a>(\*\*<a href="src/supermemory/types/connection_list_params.py">params</a>) -> <a href="./src/supermemory/types/connection_list_response.py">ConnectionListResponse</a></code>
|
|
67
|
+
- <code title="delete /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">delete_by_id</a>(connection_id) -> <a href="./src/supermemory/types/connection_delete_by_id_response.py">ConnectionDeleteByIDResponse</a></code>
|
|
68
|
+
- <code title="delete /v3/connections/{provider}">client.connections.<a href="./src/supermemory/resources/connections.py">delete_by_provider</a>(provider, \*\*<a href="src/supermemory/types/connection_delete_by_provider_params.py">params</a>) -> <a href="./src/supermemory/types/connection_delete_by_provider_response.py">ConnectionDeleteByProviderResponse</a></code>
|
|
69
|
+
- <code title="get /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">get_by_id</a>(connection_id) -> <a href="./src/supermemory/types/connection_get_by_id_response.py">ConnectionGetByIDResponse</a></code>
|
|
70
|
+
- <code title="post /v3/connections/{provider}/connection">client.connections.<a href="./src/supermemory/resources/connections.py">get_by_tags</a>(provider, \*\*<a href="src/supermemory/types/connection_get_by_tags_params.py">params</a>) -> <a href="./src/supermemory/types/connection_get_by_tags_response.py">ConnectionGetByTagsResponse</a></code>
|
|
71
|
+
- <code title="post /v3/connections/{provider}/import">client.connections.<a href="./src/supermemory/resources/connections.py">import\_</a>(provider, \*\*<a href="src/supermemory/types/connection_import_params.py">params</a>) -> None</code>
|
|
72
|
+
- <code title="post /v3/connections/{provider}/documents">client.connections.<a href="./src/supermemory/resources/connections.py">list_documents</a>(provider, \*\*<a href="src/supermemory/types/connection_list_documents_params.py">params</a>) -> <a href="./src/supermemory/types/connection_list_documents_response.py">ConnectionListDocumentsResponse</a></code>
|
|
@@ -8,7 +8,7 @@ show_error_codes = True
|
|
|
8
8
|
#
|
|
9
9
|
# We also exclude our `tests` as mypy doesn't always infer
|
|
10
10
|
# types correctly and Pyright will still catch any type errors.
|
|
11
|
-
exclude = ^(src/
|
|
11
|
+
exclude = ^(src/supermemory/_files\.py|_dev/.*\.py|tests/.*)$
|
|
12
12
|
|
|
13
13
|
strict_equality = True
|
|
14
14
|
implicit_reexport = True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "supermemory"
|
|
3
|
-
version = "3.0.0-alpha.
|
|
3
|
+
version = "3.0.0-alpha.22"
|
|
4
4
|
description = "The official Python library for the supermemory API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -78,14 +78,14 @@ format = { chain = [
|
|
|
78
78
|
"check:ruff" = "ruff check ."
|
|
79
79
|
"fix:ruff" = "ruff check --fix ."
|
|
80
80
|
|
|
81
|
-
"check:importable" = "python -c 'import
|
|
81
|
+
"check:importable" = "python -c 'import supermemory'"
|
|
82
82
|
|
|
83
83
|
typecheck = { chain = [
|
|
84
84
|
"typecheck:pyright",
|
|
85
85
|
"typecheck:mypy"
|
|
86
86
|
]}
|
|
87
87
|
"typecheck:pyright" = "pyright"
|
|
88
|
-
"typecheck:verify-types" = "pyright --verifytypes
|
|
88
|
+
"typecheck:verify-types" = "pyright --verifytypes supermemory --ignoreexternal"
|
|
89
89
|
"typecheck:mypy" = "mypy ."
|
|
90
90
|
|
|
91
91
|
[build-system]
|
|
@@ -98,7 +98,7 @@ include = [
|
|
|
98
98
|
]
|
|
99
99
|
|
|
100
100
|
[tool.hatch.build.targets.wheel]
|
|
101
|
-
packages = ["src/
|
|
101
|
+
packages = ["src/supermemory"]
|
|
102
102
|
|
|
103
103
|
[tool.hatch.build.targets.sdist]
|
|
104
104
|
# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)
|
|
@@ -201,7 +201,7 @@ length-sort = true
|
|
|
201
201
|
length-sort-straight = true
|
|
202
202
|
combine-as-imports = true
|
|
203
203
|
extra-standard-library = ["typing_extensions"]
|
|
204
|
-
known-first-party = ["
|
|
204
|
+
known-first-party = ["supermemory", "tests"]
|
|
205
205
|
|
|
206
206
|
[tool.ruff.lint.per-file-ignores]
|
|
207
207
|
"bin/**.py" = ["T201", "T203"]
|
{supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/__init__.py
RENAMED
|
@@ -89,12 +89,12 @@ _setup_logging()
|
|
|
89
89
|
# Update the __module__ attribute for exported symbols so that
|
|
90
90
|
# error messages point to this module instead of the module
|
|
91
91
|
# it was originally defined in, e.g.
|
|
92
|
-
#
|
|
92
|
+
# supermemory._exceptions.NotFoundError -> supermemory.NotFoundError
|
|
93
93
|
__locals = locals()
|
|
94
94
|
for __name in __all__:
|
|
95
95
|
if not __name.startswith("__"):
|
|
96
96
|
try:
|
|
97
|
-
__locals[__name].__module__ = "
|
|
97
|
+
__locals[__name].__module__ = "supermemory"
|
|
98
98
|
except (TypeError, AttributeError):
|
|
99
99
|
# Some of our exported symbols are builtins which we can't set attributes for.
|
|
100
100
|
pass
|
{supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_base_client.py
RENAMED
|
@@ -389,7 +389,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
389
389
|
|
|
390
390
|
if max_retries is None: # pyright: ignore[reportUnnecessaryComparison]
|
|
391
391
|
raise TypeError(
|
|
392
|
-
"max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `
|
|
392
|
+
"max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `supermemory.DEFAULT_MAX_RETRIES`"
|
|
393
393
|
)
|
|
394
394
|
|
|
395
395
|
def _enforce_trailing_slash(self, url: URL) -> URL:
|
{supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_response.py
RENAMED
|
@@ -218,7 +218,7 @@ class BaseAPIResponse(Generic[R]):
|
|
|
218
218
|
and issubclass(origin, pydantic.BaseModel)
|
|
219
219
|
):
|
|
220
220
|
raise TypeError(
|
|
221
|
-
"Pydantic models must subclass our base model type, e.g. `from
|
|
221
|
+
"Pydantic models must subclass our base model type, e.g. `from supermemory import BaseModel`"
|
|
222
222
|
)
|
|
223
223
|
|
|
224
224
|
if (
|
|
@@ -285,7 +285,7 @@ class APIResponse(BaseAPIResponse[R]):
|
|
|
285
285
|
the `to` argument, e.g.
|
|
286
286
|
|
|
287
287
|
```py
|
|
288
|
-
from
|
|
288
|
+
from supermemory import BaseModel
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
class MyModel(BaseModel):
|
|
@@ -387,7 +387,7 @@ class AsyncAPIResponse(BaseAPIResponse[R]):
|
|
|
387
387
|
the `to` argument, e.g.
|
|
388
388
|
|
|
389
389
|
```py
|
|
390
|
-
from
|
|
390
|
+
from supermemory import BaseModel
|
|
391
391
|
|
|
392
392
|
|
|
393
393
|
class MyModel(BaseModel):
|
|
@@ -558,7 +558,7 @@ class AsyncStreamedBinaryAPIResponse(AsyncAPIResponse[bytes]):
|
|
|
558
558
|
class MissingStreamClassError(TypeError):
|
|
559
559
|
def __init__(self) -> None:
|
|
560
560
|
super().__init__(
|
|
561
|
-
"The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `
|
|
561
|
+
"The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `supermemory._streaming` for reference",
|
|
562
562
|
)
|
|
563
563
|
|
|
564
564
|
|
|
@@ -81,7 +81,7 @@ HttpxRequestFiles = Union[Mapping[str, HttpxFileTypes], Sequence[Tuple[str, Http
|
|
|
81
81
|
# This unfortunately means that you will either have
|
|
82
82
|
# to import this type and pass it explicitly:
|
|
83
83
|
#
|
|
84
|
-
# from
|
|
84
|
+
# from supermemory import NoneType
|
|
85
85
|
# client.get('/foo', cast_to=NoneType)
|
|
86
86
|
#
|
|
87
87
|
# or build it yourself:
|
{supermemory-3.0.0a21/src/supermemory_new → supermemory-3.0.0a22/src/supermemory}/_utils/_logs.py
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import logging
|
|
3
3
|
|
|
4
|
-
logger: logging.Logger = logging.getLogger("
|
|
4
|
+
logger: logging.Logger = logging.getLogger("supermemory")
|
|
5
5
|
httpx_logger: logging.Logger = logging.getLogger("httpx")
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def _basic_config() -> None:
|
|
9
|
-
# e.g. [2023-10-05 14:12:26 -
|
|
9
|
+
# e.g. [2023-10-05 14:12:26 - supermemory._base_client:818 - DEBUG] HTTP Request: POST http://127.0.0.1:4010/foo/bar "200 OK"
|
|
10
10
|
logging.basicConfig(
|
|
11
11
|
format="[%(asctime)s - %(name)s:%(lineno)d - %(levelname)s] %(message)s",
|
|
12
12
|
datefmt="%Y-%m-%d %H:%M:%S",
|
|
@@ -7,17 +7,17 @@ from ._proxy import LazyProxy
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ResourcesProxy(LazyProxy[Any]):
|
|
10
|
-
"""A proxy for the `
|
|
10
|
+
"""A proxy for the `supermemory.resources` module.
|
|
11
11
|
|
|
12
|
-
This is used so that we can lazily import `
|
|
13
|
-
needed *and* so that users can just import `
|
|
12
|
+
This is used so that we can lazily import `supermemory.resources` only when
|
|
13
|
+
needed *and* so that users can just import `supermemory` and reference `supermemory.resources`
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
@override
|
|
17
17
|
def __load__(self) -> Any:
|
|
18
18
|
import importlib
|
|
19
19
|
|
|
20
|
-
mod = importlib.import_module("
|
|
20
|
+
mod = importlib.import_module("supermemory.resources")
|
|
21
21
|
return mod
|
|
22
22
|
|
|
23
23
|
|
|
@@ -7,9 +7,9 @@ from typing import Any, cast
|
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
|
+
from supermemory import Supermemory, AsyncSupermemory
|
|
10
11
|
from tests.utils import assert_matches_type
|
|
11
|
-
from
|
|
12
|
-
from supermemory_new.types import (
|
|
12
|
+
from supermemory.types import (
|
|
13
13
|
ConnectionListResponse,
|
|
14
14
|
ConnectionCreateResponse,
|
|
15
15
|
ConnectionGetByIDResponse,
|
|
@@ -7,9 +7,9 @@ from typing import Any, cast
|
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
|
+
from supermemory import Supermemory, AsyncSupermemory
|
|
10
11
|
from tests.utils import assert_matches_type
|
|
11
|
-
from
|
|
12
|
-
from supermemory_new.types import (
|
|
12
|
+
from supermemory.types import (
|
|
13
13
|
MemoryAddResponse,
|
|
14
14
|
MemoryGetResponse,
|
|
15
15
|
MemoryListResponse,
|
|
@@ -7,9 +7,9 @@ from typing import Any, cast
|
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
|
+
from supermemory import Supermemory, AsyncSupermemory
|
|
10
11
|
from tests.utils import assert_matches_type
|
|
11
|
-
from
|
|
12
|
-
from supermemory_new.types import SearchExecuteResponse
|
|
12
|
+
from supermemory.types import SearchExecuteResponse
|
|
13
13
|
|
|
14
14
|
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
|
15
15
|
|
|
@@ -7,9 +7,9 @@ from typing import Any, cast
|
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
|
+
from supermemory import Supermemory, AsyncSupermemory
|
|
10
11
|
from tests.utils import assert_matches_type
|
|
11
|
-
from
|
|
12
|
-
from supermemory_new.types import SettingGetResponse, SettingUpdateResponse
|
|
12
|
+
from supermemory.types import SettingGetResponse, SettingUpdateResponse
|
|
13
13
|
|
|
14
14
|
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
|
15
15
|
|
|
@@ -10,15 +10,15 @@ import httpx
|
|
|
10
10
|
import pytest
|
|
11
11
|
from pytest_asyncio import is_async_test
|
|
12
12
|
|
|
13
|
-
from
|
|
14
|
-
from
|
|
13
|
+
from supermemory import Supermemory, AsyncSupermemory, DefaultAioHttpClient
|
|
14
|
+
from supermemory._utils import is_dict
|
|
15
15
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
17
|
from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage]
|
|
18
18
|
|
|
19
19
|
pytest.register_assert_rewrite("tests.utils")
|
|
20
20
|
|
|
21
|
-
logging.getLogger("
|
|
21
|
+
logging.getLogger("supermemory").setLevel(logging.DEBUG)
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
# automatically add `pytest.mark.asyncio()` to all of our async tests
|