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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
runs-on: ${{ github.repository == 'stainless-sdks/supermemory-new-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

Expand Down
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.0.0-alpha.28"
".": "3.0.0-alpha.29"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 18
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-bc38a818a02d2611e24859c4fd59ce98a24499af22ac9d16fc93a3d1e0b3c94f.yml
openapi_spec_hash: e25323c2c0f792f2fafc664748774e46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-de994787885a5ec28fb19f069715a257ea4e4f1bcff2b25c4b33e928779c6454.yml
openapi_spec_hash: 7b831b4614b8d9b8caddcaa096bf3817
config_hash: 9b9291a6c872b063900a46386729ba3c
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 3.0.0-alpha.29 (2025-08-27)

Full Changelog: [v3.0.0-alpha.28...v3.0.0-alpha.29](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.28...v3.0.0-alpha.29)

### Features

* **api:** api update ([5c48767](https://github.com/supermemoryai/python-sdk/commit/5c48767f77b0daf362be422e6d2d8843c15692b3))
* **api:** api update ([8eb53ac](https://github.com/supermemoryai/python-sdk/commit/8eb53ac4b04fae2f656d82c2c36c01e6583a08e0))
* **api:** api update ([9194990](https://github.com/supermemoryai/python-sdk/commit/9194990dfbe4e8b9a3fe145095ae65c1cab1b342))
* **api:** api update ([be04a5c](https://github.com/supermemoryai/python-sdk/commit/be04a5cf50c9af30b04e43128a860a93305f401a))


### Bug Fixes

* avoid newer type syntax ([cd791b9](https://github.com/supermemoryai/python-sdk/commit/cd791b97c02fe5728e54482097c846557ab0d555))


### Chores

* **internal:** change ci workflow machines ([002a748](https://github.com/supermemoryai/python-sdk/commit/002a748ddf690fcaeab905c622fe598ddc0f6629))
* **internal:** update pyright exclude list ([41a59ff](https://github.com/supermemoryai/python-sdk/commit/41a59ff7fb26bd419f747265c00a99ad750833d0))

## 3.0.0-alpha.28 (2025-08-24)

Full Changelog: [v3.0.0-alpha.27...v3.0.0-alpha.28](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.27...v3.0.0-alpha.28)
Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ from supermemory.types import (
ConnectionDeleteByProviderResponse,
ConnectionGetByIDResponse,
ConnectionGetByTagsResponse,
ConnectionImportResponse,
ConnectionListDocumentsResponse,
)
```
Expand All @@ -72,5 +73,5 @@ Methods:
- <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}/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>
- <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>
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.0.0-alpha.28"
version = "3.0.0-alpha.29"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -148,6 +148,7 @@ exclude = [
"_dev",
".venv",
".nox",
".git",
]

reportImplicitOverride = true
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def model_dump(
exclude_none=exclude_none,
)

return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped
return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped

@override
def model_dump_json(
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "supermemory"
__version__ = "3.0.0-alpha.28" # x-release-please-version
__version__ = "3.0.0-alpha.29" # x-release-please-version
14 changes: 7 additions & 7 deletions src/supermemory/resources/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
connection_list_documents_params,
connection_delete_by_provider_params,
)
from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
Expand Down Expand Up @@ -293,7 +293,7 @@ def import_(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
) -> str:
"""
Initiate a manual sync of connections

Expand All @@ -310,14 +310,14 @@ def import_(
"""
if not provider:
raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {"Accept": "text/plain", **(extra_headers or {})}
return self._post(
f"/v3/connections/{provider}/import",
body=maybe_transform({"container_tags": container_tags}, connection_import_params.ConnectionImportParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=NoneType,
cast_to=str,
)

def list_documents(
Expand Down Expand Up @@ -618,7 +618,7 @@ async def import_(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
) -> str:
"""
Initiate a manual sync of connections

Expand All @@ -635,7 +635,7 @@ async def import_(
"""
if not provider:
raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {"Accept": "text/plain", **(extra_headers or {})}
return await self._post(
f"/v3/connections/{provider}/import",
body=await async_maybe_transform(
Expand All @@ -644,7 +644,7 @@ async def import_(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=NoneType,
cast_to=str,
)

async def list_documents(
Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/resources/memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def list(
*,
container_tags: List[str] | NotGiven = NOT_GIVEN,
filters: str | NotGiven = NOT_GIVEN,
include_content: bool | NotGiven = NOT_GIVEN,
limit: Union[str, float] | NotGiven = NOT_GIVEN,
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: Union[str, float] | NotGiven = NOT_GIVEN,
Expand All @@ -146,6 +147,9 @@ def list(

filters: Optional filters to apply to the search

include_content: Whether to include the content field in the response. Warning: This can make
responses significantly larger.

limit: Number of items per page

order: Sort order
Expand All @@ -168,6 +172,7 @@ def list(
{
"container_tags": container_tags,
"filters": filters,
"include_content": include_content,
"limit": limit,
"order": order,
"page": page,
Expand Down Expand Up @@ -462,6 +467,7 @@ async def list(
*,
container_tags: List[str] | NotGiven = NOT_GIVEN,
filters: str | NotGiven = NOT_GIVEN,
include_content: bool | NotGiven = NOT_GIVEN,
limit: Union[str, float] | NotGiven = NOT_GIVEN,
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: Union[str, float] | NotGiven = NOT_GIVEN,
Expand All @@ -482,6 +488,9 @@ async def list(

filters: Optional filters to apply to the search

include_content: Whether to include the content field in the response. Warning: This can make
responses significantly larger.

limit: Number of items per page

order: Sort order
Expand All @@ -504,6 +513,7 @@ async def list(
{
"container_tags": container_tags,
"filters": filters,
"include_content": include_content,
"limit": limit,
"order": order,
"page": page,
Expand Down
1 change: 1 addition & 0 deletions src/supermemory/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from .memory_upload_file_params import MemoryUploadFileParams as MemoryUploadFileParams
from .search_documents_response import SearchDocumentsResponse as SearchDocumentsResponse
from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
from .connection_import_response import ConnectionImportResponse as ConnectionImportResponse
from .memory_upload_file_response import MemoryUploadFileResponse as MemoryUploadFileResponse
from .connection_get_by_id_response import ConnectionGetByIDResponse as ConnectionGetByIDResponse
from .connection_get_by_tags_params import ConnectionGetByTagsParams as ConnectionGetByTagsParams
Expand Down
7 changes: 7 additions & 0 deletions src/supermemory/types/connection_import_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import TypeAlias

__all__ = ["ConnectionImportResponse"]

ConnectionImportResponse: TypeAlias = str
6 changes: 6 additions & 0 deletions src/supermemory/types/memory_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class MemoryListParams(TypedDict, total=False):
filters: str
"""Optional filters to apply to the search"""

include_content: Annotated[bool, PropertyInfo(alias="includeContent")]
"""Whether to include the content field in the response.

Warning: This can make responses significantly larger.
"""

limit: Union[str, float]
"""Number of items per page"""

Expand Down
3 changes: 3 additions & 0 deletions src/supermemory/types/memory_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class Memory(BaseModel):
to use to group memories.
"""

content: Optional[str] = None
"""Content of the memory (only included when includeContent=true)"""


class Pagination(BaseModel):
current_page: float = FieldInfo(alias="currentPage")
Expand Down
16 changes: 8 additions & 8 deletions tests/api_resources/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def test_method_import(self, client: Supermemory) -> None:
connection = client.connections.import_(
provider="notion",
)
assert connection is None
assert_matches_type(str, connection, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
Expand All @@ -280,7 +280,7 @@ def test_method_import_with_all_params(self, client: Supermemory) -> None:
provider="notion",
container_tags=["user_123", "project_123"],
)
assert connection is None
assert_matches_type(str, connection, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
Expand All @@ -292,7 +292,7 @@ def test_raw_response_import(self, client: Supermemory) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
connection = response.parse()
assert connection is None
assert_matches_type(str, connection, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
Expand All @@ -304,7 +304,7 @@ def test_streaming_response_import(self, client: Supermemory) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

connection = response.parse()
assert connection is None
assert_matches_type(str, connection, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down Expand Up @@ -603,7 +603,7 @@ async def test_method_import(self, async_client: AsyncSupermemory) -> None:
connection = await async_client.connections.import_(
provider="notion",
)
assert connection is None
assert_matches_type(str, connection, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
Expand All @@ -612,7 +612,7 @@ async def test_method_import_with_all_params(self, async_client: AsyncSupermemor
provider="notion",
container_tags=["user_123", "project_123"],
)
assert connection is None
assert_matches_type(str, connection, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
Expand All @@ -624,7 +624,7 @@ async def test_raw_response_import(self, async_client: AsyncSupermemory) -> None
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
connection = await response.parse()
assert connection is None
assert_matches_type(str, connection, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
Expand All @@ -636,7 +636,7 @@ async def test_streaming_response_import(self, async_client: AsyncSupermemory) -
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

connection = await response.parse()
assert connection is None
assert_matches_type(str, connection, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None:
memory = client.memories.list(
container_tags=["user_123", "project_123"],
filters='{"AND":[{"key":"group","negate":false,"value":"jira_users"},{"filterType":"numeric","key":"timestamp","negate":false,"numericOperator":">","value":"1742745777"}]}',
include_content=False,
limit=10,
order="desc",
page=1,
Expand Down Expand Up @@ -380,6 +381,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory)
memory = await async_client.memories.list(
container_tags=["user_123", "project_123"],
filters='{"AND":[{"key":"group","negate":false,"value":"jira_users"},{"filterType":"numeric","key":"timestamp","negate":false,"numericOperator":">","value":"1742745777"}]}',
include_content=False,
limit=10,
order="desc",
page=1,
Expand Down