Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.8.0"
".": "3.9.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-8f3109ed6b4537d66c1d430e552cb6d90323c2b495487132f5c5fc7fb0f91478.yml
openapi_spec_hash: e2f06a2c0e73fb52262924ecd4027a6c
config_hash: ec08a36e60458b4d83e71798a8043484
configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-3856961a8959b60dbf0b6912d69c23390fbbca1c5e31028dd0decc85234dd285.yml
openapi_spec_hash: 988a7d6d7cef81ceb4acda3ef9f8c21e
config_hash: 7dd9730225e87663fd62814dcfe62ba7
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 3.9.0 (2025-12-09)

Full Changelog: [v3.8.0...v3.9.0](https://github.com/supermemoryai/python-sdk/compare/v3.8.0...v3.9.0)

### Features

* **api:** api update ([3042cbf](https://github.com/supermemoryai/python-sdk/commit/3042cbfd221d52291480c6df1c1fca40eb97a61f))
* **api:** manual updates ([96b34d0](https://github.com/supermemoryai/python-sdk/commit/96b34d0a371e0d9c9866e1dbbfd70329d9400850))


### Bug Fixes

* ensure streams are always closed ([a1403da](https://github.com/supermemoryai/python-sdk/commit/a1403da98836ac4215ee81f168ff044dcd83fc83))
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([4c1365d](https://github.com/supermemoryai/python-sdk/commit/4c1365d2bc02b2d81eb99ef93ac56f1f1b6aba3c))


### Chores

* add missing docstrings ([bdb32bc](https://github.com/supermemoryai/python-sdk/commit/bdb32bc4a13ae9a73409f827082a1c5637dc9860))
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([2fc3d2a](https://github.com/supermemoryai/python-sdk/commit/2fc3d2a92410192a31bb1c4a7b85094c2ea55f4a))
* **docs:** use environment variables for authentication in code snippets ([442b9fd](https://github.com/supermemoryai/python-sdk/commit/442b9fdc7e8b7b07dc82cc087ffbc6fbe60bd12f))
* update lockfile ([37b9f74](https://github.com/supermemoryai/python-sdk/commit/37b9f74097fdc2e3395714ccb72c0f470d162ac4))

## 3.8.0 (2025-11-27)

Full Changelog: [v3.7.0...v3.8.0](https://github.com/supermemoryai/python-sdk/compare/v3.7.0...v3.8.0)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ pip install supermemory[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from supermemory import DefaultAioHttpClient
from supermemory import AsyncSupermemory


async def main() -> None:
async with AsyncSupermemory(
api_key="My API Key",
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
response = await client.search.documents(
Expand Down Expand Up @@ -120,7 +121,7 @@ from supermemory import Supermemory

client = Supermemory()

response = client.search.memories(
response = client.search(
q="machine learning concepts",
include={},
)
Expand Down
17 changes: 14 additions & 3 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
Types:

```python
from supermemory.types import AddResponse, ProfileResponse
from supermemory.types import AddResponse, ProfileResponse, SearchResponse
```

Methods:

- <code title="post /v3/documents">client.<a href="./src/supermemory/_client.py">add</a>(\*\*<a href="src/supermemory/types/client_add_params.py">params</a>) -> <a href="./src/supermemory/types/add_response.py">AddResponse</a></code>
- <code title="post /v4/profile">client.<a href="./src/supermemory/_client.py">profile</a>(\*\*<a href="src/supermemory/types/client_profile_params.py">params</a>) -> <a href="./src/supermemory/types/profile_response.py">ProfileResponse</a></code>
- <code title="post /v4/search">client.<a href="./src/supermemory/_client.py">search</a>(\*\*<a href="src/supermemory/types/client_search_params.py">params</a>) -> <a href="./src/supermemory/types/search_response.py">SearchResponse</a></code>

# Memories

Expand All @@ -20,7 +21,9 @@ from supermemory.types import (
MemoryUpdateResponse,
MemoryListResponse,
MemoryAddResponse,
MemoryForgetResponse,
MemoryGetResponse,
MemoryUpdateMemoryResponse,
MemoryUploadFileResponse,
)
```
Expand All @@ -31,7 +34,9 @@ Methods:
- <code title="post /v3/documents/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>
- <code title="delete /v3/documents/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">delete</a>(id) -> None</code>
- <code title="post /v3/documents">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>
- <code title="delete /v4/memories">client.memories.<a href="./src/supermemory/resources/memories.py">forget</a>(\*\*<a href="src/supermemory/types/memory_forget_params.py">params</a>) -> <a href="./src/supermemory/types/memory_forget_response.py">MemoryForgetResponse</a></code>
- <code title="get /v3/documents/{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>
- <code title="patch /v4/memories">client.memories.<a href="./src/supermemory/resources/memories.py">update_memory</a>(\*\*<a href="src/supermemory/types/memory_update_memory_params.py">params</a>) -> <a href="./src/supermemory/types/memory_update_memory_response.py">MemoryUpdateMemoryResponse</a></code>
- <code title="post /v3/documents/file">client.memories.<a href="./src/supermemory/resources/memories.py">upload_file</a>(\*\*<a href="src/supermemory/types/memory_upload_file_params.py">params</a>) -> <a href="./src/supermemory/types/memory_upload_file_response.py">MemoryUploadFileResponse</a></code>

# Documents
Expand All @@ -43,6 +48,7 @@ from supermemory.types import (
DocumentUpdateResponse,
DocumentListResponse,
DocumentAddResponse,
DocumentDeleteBulkResponse,
DocumentGetResponse,
DocumentUploadFileResponse,
)
Expand All @@ -54,6 +60,7 @@ Methods:
- <code title="post /v3/documents/list">client.documents.<a href="./src/supermemory/resources/documents.py">list</a>(\*\*<a href="src/supermemory/types/document_list_params.py">params</a>) -> <a href="./src/supermemory/types/document_list_response.py">DocumentListResponse</a></code>
- <code title="delete /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">delete</a>(id) -> None</code>
- <code title="post /v3/documents">client.documents.<a href="./src/supermemory/resources/documents.py">add</a>(\*\*<a href="src/supermemory/types/document_add_params.py">params</a>) -> <a href="./src/supermemory/types/document_add_response.py">DocumentAddResponse</a></code>
- <code title="delete /v3/documents/bulk">client.documents.<a href="./src/supermemory/resources/documents.py">delete_bulk</a>(\*\*<a href="src/supermemory/types/document_delete_bulk_params.py">params</a>) -> <a href="./src/supermemory/types/document_delete_bulk_response.py">DocumentDeleteBulkResponse</a></code>
- <code title="get /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">get</a>(id) -> <a href="./src/supermemory/types/document_get_response.py">DocumentGetResponse</a></code>
- <code title="post /v3/documents/file">client.documents.<a href="./src/supermemory/resources/documents.py">upload_file</a>(\*\*<a href="src/supermemory/types/document_upload_file_params.py">params</a>) -> <a href="./src/supermemory/types/document_upload_file_response.py">DocumentUploadFileResponse</a></code>

Expand Down Expand Up @@ -92,22 +99,26 @@ Types:
from supermemory.types import (
ConnectionCreateResponse,
ConnectionListResponse,
ConnectionConfigureResponse,
ConnectionDeleteByIDResponse,
ConnectionDeleteByProviderResponse,
ConnectionGetByIDResponse,
ConnectionGetByTagsResponse,
ConnectionGetByTagResponse,
ConnectionImportResponse,
ConnectionListDocumentsResponse,
ConnectionResourcesResponse,
)
```

Methods:

- <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>
- <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>
- <code title="post /v3/connections/{connectionId}/configure">client.connections.<a href="./src/supermemory/resources/connections.py">configure</a>(connection_id, \*\*<a href="src/supermemory/types/connection_configure_params.py">params</a>) -> <a href="./src/supermemory/types/connection_configure_response.py">ConnectionConfigureResponse</a></code>
- <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>
- <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>
- <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>
- <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>
- <code title="post /v3/connections/{provider}/connection">client.connections.<a href="./src/supermemory/resources/connections.py">get_by_tag</a>(provider, \*\*<a href="src/supermemory/types/connection_get_by_tag_params.py">params</a>) -> <a href="./src/supermemory/types/connection_get_by_tag_response.py">ConnectionGetByTagResponse</a></code>
- <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>) -> str</code>
- <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>
- <code title="get /v3/connections/{connectionId}/resources">client.connections.<a href="./src/supermemory/resources/connections.py">resources</a>(connection_id, \*\*<a href="src/supermemory/types/connection_resources_params.py">params</a>) -> <a href="./src/supermemory/types/connection_resources_response.py">ConnectionResourcesResponse</a></code>
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
[project]
name = "supermemory"
version = "3.8.0"
version = "3.9.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
authors = [
{ name = "Supermemory", email = "dhravya@supermemory.com" },
]

dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
]

requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
Expand Down Expand Up @@ -46,7 +48,7 @@ managed = true
# version pins are in requirements-dev.lock
dev-dependencies = [
"pyright==1.1.399",
"mypy",
"mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
Expand Down
112 changes: 62 additions & 50 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,45 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.12.8
aiohttp==3.13.2
# via httpx-aiohttp
# via supermemory
aiosignal==1.3.2
aiosignal==1.4.0
# via aiohttp
annotated-types==0.6.0
annotated-types==0.7.0
# via pydantic
anyio==4.4.0
anyio==4.12.0
# via httpx
# via supermemory
argcomplete==3.1.2
argcomplete==3.6.3
# via nox
async-timeout==5.0.1
# via aiohttp
attrs==25.3.0
attrs==25.4.0
# via aiohttp
certifi==2023.7.22
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2025.11.12
# via httpcore
# via httpx
colorlog==6.7.0
colorlog==6.10.1
# via nox
dependency-groups==1.3.1
# via nox
dirty-equals==0.6.0
distlib==0.3.7
dirty-equals==0.11
distlib==0.4.0
# via virtualenv
distro==1.8.0
distro==1.9.0
# via supermemory
exceptiongroup==1.2.2
exceptiongroup==1.3.1
# via anyio
# via pytest
execnet==2.1.1
execnet==2.1.2
# via pytest-xdist
filelock==3.12.4
filelock==3.19.1
# via virtualenv
frozenlist==1.6.2
frozenlist==1.8.0
# via aiohttp
# via aiosignal
h11==0.16.0
Expand All @@ -58,80 +63,87 @@ httpx==0.28.1
# via supermemory
httpx-aiohttp==0.1.9
# via supermemory
idna==3.4
humanize==4.13.0
# via nox
idna==3.11
# via anyio
# via httpx
# via yarl
importlib-metadata==7.0.0
iniconfig==2.0.0
importlib-metadata==8.7.0
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
multidict==6.4.4
multidict==6.7.0
# via aiohttp
# via yarl
mypy==1.14.1
mypy-extensions==1.0.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nodeenv==1.8.0
nodeenv==1.9.1
# via pyright
nox==2023.4.22
packaging==23.2
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
platformdirs==3.11.0
pathspec==0.12.1
# via mypy
platformdirs==4.4.0
# via virtualenv
pluggy==1.5.0
pluggy==1.6.0
# via pytest
propcache==0.3.1
propcache==0.4.1
# via aiohttp
# via yarl
pydantic==2.11.9
pydantic==2.12.5
# via supermemory
pydantic-core==2.33.2
pydantic-core==2.41.5
# via pydantic
pygments==2.18.0
pygments==2.19.2
# via pytest
# via rich
pyright==1.1.399
pytest==8.3.3
pytest==8.4.2
# via pytest-asyncio
# via pytest-xdist
pytest-asyncio==0.24.0
pytest-xdist==3.7.0
python-dateutil==2.8.2
pytest-asyncio==1.2.0
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0
# via time-machine
pytz==2023.3.post1
# via dirty-equals
respx==0.22.0
rich==13.7.1
ruff==0.9.4
setuptools==68.2.2
# via nodeenv
six==1.16.0
rich==14.2.0
ruff==0.14.7
six==1.17.0
# via python-dateutil
sniffio==1.3.0
# via anyio
sniffio==1.3.1
# via supermemory
time-machine==2.9.0
tomli==2.0.2
time-machine==2.19.0
tomli==2.3.0
# via dependency-groups
# via mypy
# via nox
# via pytest
typing-extensions==4.12.2
typing-extensions==4.15.0
# via aiosignal
# via anyio
# via exceptiongroup
# via multidict
# via mypy
# via pydantic
# via pydantic-core
# via pyright
# via pytest-asyncio
# via supermemory
# via typing-inspection
typing-inspection==0.4.1
# via virtualenv
typing-inspection==0.4.2
# via pydantic
virtualenv==20.24.5
virtualenv==20.35.4
# via nox
yarl==1.20.0
yarl==1.22.0
# via aiohttp
zipp==3.17.0
zipp==3.23.0
# via importlib-metadata
Loading
Loading