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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/supermemory-new-python'
if: |-
github.repository == 'stainless-sdks/supermemory-new-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/supermemory-new-python'
if: |-
github.repository == 'stainless-sdks/supermemory-new-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
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.27.0"
".": "3.28.0"
}
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-062b5e0b84ca5acf4b18f1a9650e023e1908ee6f2b88465e55ba5213ee9257bf.yml
openapi_spec_hash: c465d5d777712bec4bdd8e6aa81a0da9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-8d6903994bad6e2f9510fb021df21f84a3efa8f63abfff814455d666efa7388a.yml
openapi_spec_hash: f9e80ec52ae9aecbd23a365dc1a3932f
config_hash: f3eb5ca71172780678106f6d46f15dda
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 3.28.0 (2026-03-09)

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

### Features

* **api:** api update ([0631be2](https://github.com/supermemoryai/python-sdk/commit/0631be2c3b7274f34b362ddc902c7f377c5ee11b))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([9b8ce06](https://github.com/supermemoryai/python-sdk/commit/9b8ce065606550ceec128b6d8e0fd15f51c3c32d))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([0f56565](https://github.com/supermemoryai/python-sdk/commit/0f5656508ff42b297ec9a47b40d06a5ffc0a1a7e))
* update placeholder string ([f37dc85](https://github.com/supermemoryai/python-sdk/commit/f37dc85ff4113d4a8c7f1155eecd8ae90db5bb14))

## 3.27.0 (2026-02-24)

Full Changelog: [v3.26.0...v3.27.0](https://github.com/supermemoryai/python-sdk/compare/v3.26.0...v3.27.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.27.0"
version = "3.28.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions src/supermemory/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def add(
website, a PDF, an image, or a video.

container_tag: Optional tag this document should be containerized by. Max 100 characters,
alphanumeric with hyphens and underscores only.
alphanumeric with hyphens, underscores, and dots only.

custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
hyphens and underscores only.
hyphens, underscores, and dots only.

entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
document processing to guide memory extraction.
Expand Down Expand Up @@ -571,10 +571,10 @@ async def add(
website, a PDF, an image, or a video.

container_tag: Optional tag this document should be containerized by. Max 100 characters,
alphanumeric with hyphens and underscores only.
alphanumeric with hyphens, underscores, and dots only.

custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
hyphens and underscores only.
hyphens, underscores, and dots only.

entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
document processing to guide memory extraction.
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.27.0" # x-release-please-version
__version__ = "3.28.0" # x-release-please-version
4 changes: 4 additions & 0 deletions src/supermemory/resources/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def create(
self,
provider: Literal["notion", "google-drive", "onedrive", "gmail", "github", "web-crawler", "s3"],
*,
container_tag: str | Omit = omit,
container_tags: SequenceNotStr[str] | Omit = omit,
document_limit: int | Omit = omit,
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
Expand Down Expand Up @@ -94,6 +95,7 @@ def create(
f"/v3/connections/{provider}",
body=maybe_transform(
{
"container_tag": container_tag,
"container_tags": container_tags,
"document_limit": document_limit,
"metadata": metadata,
Expand Down Expand Up @@ -468,6 +470,7 @@ async def create(
self,
provider: Literal["notion", "google-drive", "onedrive", "gmail", "github", "web-crawler", "s3"],
*,
container_tag: str | Omit = omit,
container_tags: SequenceNotStr[str] | Omit = omit,
document_limit: int | Omit = omit,
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
Expand Down Expand Up @@ -497,6 +500,7 @@ async def create(
f"/v3/connections/{provider}",
body=await async_maybe_transform(
{
"container_tag": container_tag,
"container_tags": container_tags,
"document_limit": document_limit,
"metadata": metadata,
Expand Down
8 changes: 4 additions & 4 deletions src/supermemory/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ def add(
website, a PDF, an image, or a video.

container_tag: Optional tag this document should be containerized by. Max 100 characters,
alphanumeric with hyphens and underscores only.
alphanumeric with hyphens, underscores, and dots only.

custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
hyphens and underscores only.
hyphens, underscores, and dots only.

entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
document processing to guide memory extraction.
Expand Down Expand Up @@ -743,10 +743,10 @@ async def add(
website, a PDF, an image, or a video.

container_tag: Optional tag this document should be containerized by. Max 100 characters,
alphanumeric with hyphens and underscores only.
alphanumeric with hyphens, underscores, and dots only.

custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
hyphens and underscores only.
hyphens, underscores, and dots only.

entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
document processing to guide memory extraction.
Expand Down
4 changes: 2 additions & 2 deletions src/supermemory/types/client_add_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class ClientAddParams(TypedDict, total=False):
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
"""Optional tag this document should be containerized by.

Max 100 characters, alphanumeric with hyphens and underscores only.
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
"""

container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]

custom_id: Annotated[str, PropertyInfo(alias="customId")]
"""Optional custom ID of the document.

Max 100 characters, alphanumeric with hyphens and underscores only.
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
"""

entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
Expand Down
2 changes: 2 additions & 0 deletions src/supermemory/types/connection_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@


class ConnectionCreateParams(TypedDict, total=False):
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]

container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]

document_limit: Annotated[int, PropertyInfo(alias="documentLimit")]
Expand Down
4 changes: 2 additions & 2 deletions src/supermemory/types/document_add_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class DocumentAddParams(TypedDict, total=False):
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
"""Optional tag this document should be containerized by.

Max 100 characters, alphanumeric with hyphens and underscores only.
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
"""

container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]

custom_id: Annotated[str, PropertyInfo(alias="customId")]
"""Optional custom ID of the document.

Max 100 characters, alphanumeric with hyphens and underscores only.
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
"""

entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
Expand Down
6 changes: 4 additions & 2 deletions tests/api_resources/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def test_method_create(self, client: Supermemory) -> None:
def test_method_create_with_all_params(self, client: Supermemory) -> None:
connection = client.connections.create(
provider="notion",
container_tags=["string"],
container_tag="containerTag",
container_tags=["_1K--W2kIFj1"],
document_limit=1,
metadata={"foo": "string"},
redirect_url="redirectUrl",
Expand Down Expand Up @@ -470,7 +471,8 @@ async def test_method_create(self, async_client: AsyncSupermemory) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncSupermemory) -> None:
connection = await async_client.connections.create(
provider="notion",
container_tags=["string"],
container_tag="containerTag",
container_tags=["_1K--W2kIFj1"],
document_limit=1,
metadata={"foo": "string"},
redirect_url="redirectUrl",
Expand Down
16 changes: 8 additions & 8 deletions tests/api_resources/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,15 +417,15 @@ def test_streaming_response_list_processing(self, client: Supermemory) -> None:
@parametrize
def test_method_upload_file(self, client: Supermemory) -> None:
document = client.documents.upload_file(
file=b"raw file contents",
file=b"Example data",
)
assert_matches_type(DocumentUploadFileResponse, document, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
document = client.documents.upload_file(
file=b"raw file contents",
file=b"Example data",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
Expand All @@ -438,7 +438,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
@parametrize
def test_raw_response_upload_file(self, client: Supermemory) -> None:
response = client.documents.with_raw_response.upload_file(
file=b"raw file contents",
file=b"Example data",
)

assert response.is_closed is True
Expand All @@ -450,7 +450,7 @@ def test_raw_response_upload_file(self, client: Supermemory) -> None:
@parametrize
def test_streaming_response_upload_file(self, client: Supermemory) -> None:
with client.documents.with_streaming_response.upload_file(
file=b"raw file contents",
file=b"Example data",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -857,15 +857,15 @@ async def test_streaming_response_list_processing(self, async_client: AsyncSuper
@parametrize
async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None:
document = await async_client.documents.upload_file(
file=b"raw file contents",
file=b"Example data",
)
assert_matches_type(DocumentUploadFileResponse, document, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upload_file_with_all_params(self, async_client: AsyncSupermemory) -> None:
document = await async_client.documents.upload_file(
file=b"raw file contents",
file=b"Example data",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
Expand All @@ -878,7 +878,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper
@parametrize
async def test_raw_response_upload_file(self, async_client: AsyncSupermemory) -> None:
response = await async_client.documents.with_raw_response.upload_file(
file=b"raw file contents",
file=b"Example data",
)

assert response.is_closed is True
Expand All @@ -890,7 +890,7 @@ async def test_raw_response_upload_file(self, async_client: AsyncSupermemory) ->
@parametrize
async def test_streaming_response_upload_file(self, async_client: AsyncSupermemory) -> None:
async with async_client.documents.with_streaming_response.upload_file(
file=b"raw file contents",
file=b"Example data",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down
16 changes: 14 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
# Delete in case our environment has this set
# Delete in case our environment has any proxy env vars set
monkeypatch.delenv("HTTP_PROXY", raising=False)
monkeypatch.delenv("ALL_PROXY", raising=False)
monkeypatch.delenv("NO_PROXY", raising=False)
monkeypatch.delenv("http_proxy", raising=False)
monkeypatch.delenv("https_proxy", raising=False)
monkeypatch.delenv("all_proxy", raising=False)
monkeypatch.delenv("no_proxy", raising=False)

client = DefaultHttpxClient()

Expand Down Expand Up @@ -1871,8 +1877,14 @@ async def test_get_platform(self) -> None:
async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
# Delete in case our environment has this set
# Delete in case our environment has any proxy env vars set
monkeypatch.delenv("HTTP_PROXY", raising=False)
monkeypatch.delenv("ALL_PROXY", raising=False)
monkeypatch.delenv("NO_PROXY", raising=False)
monkeypatch.delenv("http_proxy", raising=False)
monkeypatch.delenv("https_proxy", raising=False)
monkeypatch.delenv("all_proxy", raising=False)
monkeypatch.delenv("no_proxy", raising=False)

client = DefaultAsyncHttpxClient()

Expand Down