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.33.0"
".": "3.33.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-63361336422f9e8ab2d67ca0f0068c7ac5f162dae5ec6de35b362cc11f07a3cb.yml
openapi_spec_hash: 862585828a78f8f58ab03c27d6ac8db0
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-3d1ed08ae874eafef0c275748f38e21c1e6a245ecad05db24dee27f4166f18db.yml
openapi_spec_hash: fa7ccfe7d4574c280f3189d020401032
config_hash: f3eb5ca71172780678106f6d46f15dda
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 3.33.1 (2026-04-11)

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

### Bug Fixes

* ensure file data are only sent as 1 parameter ([e1f2afd](https://github.com/supermemoryai/python-sdk/commit/e1f2afdd2cc08f93999cebf584a821360186feb3))


### Documentation

* improve examples ([82e512e](https://github.com/supermemoryai/python-sdk/commit/82e512e4c2698025269ab4a4c604eb344ee1f83f))

## 3.33.0 (2026-04-08)

Full Changelog: [v3.32.0...v3.33.0](https://github.com/supermemoryai/python-sdk/compare/v3.32.0...v3.33.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.33.0"
version = "3.33.1"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/supermemory/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
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.33.0" # x-release-please-version
__version__ = "3.33.1" # x-release-please-version
8 changes: 4 additions & 4 deletions tests/api_resources/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None:
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down Expand Up @@ -192,8 +192,8 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None:
"key": "group",
"value": "jira_users",
"filter_type": "metadata",
"ignore_case": True,
"ignore_case": "true",
"negate": False,
"numeric_operator": ">",
},
{
"key": "timestamp",
"value": "1742745777",
"filter_type": "numeric",
"ignore_case": True,
"ignore_case": "true",
"negate": False,
"numeric_operator": ">",
},
Expand Down Expand Up @@ -546,15 +546,15 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory)
"key": "group",
"value": "jira_users",
"filter_type": "metadata",
"ignore_case": True,
"ignore_case": "true",
"negate": False,
"numeric_operator": ">",
},
{
"key": "timestamp",
"value": "1742745777",
"filter_type": "numeric",
"ignore_case": True,
"ignore_case": "true",
"negate": False,
"numeric_operator": ">",
},
Expand Down
24 changes: 12 additions & 12 deletions tests/api_resources/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def test_method_documents_with_all_params(self, client: Supermemory) -> None:
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down Expand Up @@ -112,8 +112,8 @@ def test_method_execute_with_all_params(self, client: Supermemory) -> None:
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down Expand Up @@ -174,8 +174,8 @@ def test_method_memories_with_all_params(self, client: Supermemory) -> None:
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down Expand Up @@ -252,8 +252,8 @@ async def test_method_documents_with_all_params(self, async_client: AsyncSuperme
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down Expand Up @@ -318,8 +318,8 @@ async def test_method_execute_with_all_params(self, async_client: AsyncSupermemo
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down Expand Up @@ -380,8 +380,8 @@ async def test_method_memories_with_all_params(self, async_client: AsyncSupermem
"key": "key",
"value": "value",
"filter_type": "metadata",
"ignore_case": True,
"negate": True,
"ignore_case": "true",
"negate": "true",
"numeric_operator": ">",
}
]
Expand Down
9 changes: 9 additions & 0 deletions tests/test_extract_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def test_multiple_files() -> None:
assert query == {"documents": [{}, {}]}


def test_top_level_file_array() -> None:
query = {"files": [b"file one", b"file two"], "title": "hello"}
assert extract_files(query, paths=[["files", "<array>"]]) == [
("files[]", b"file one"),
("files[]", b"file two"),
]
assert query == {"title": "hello"}


@pytest.mark.parametrize(
"query,paths,expected",
[
Expand Down