From 945455659b4896b89be368476adeb8c062e8d520 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 10:28:32 +0000
Subject: [PATCH 1/7] chore(internal): fix ruff target version
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 540ac080..51f218bc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -159,7 +159,7 @@ reportPrivateUsage = false
[tool.ruff]
line-length = 120
output-format = "grouped"
-target-version = "py37"
+target-version = "py38"
[tool.ruff.format]
docstring-code-format = true
From e6c05cd496db6e9df09da720bd74e6c2f0f853b7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 13:32:01 +0000
Subject: [PATCH 2/7] feat(api): api update
---
.stats.yml | 4 ++--
src/hyperspell/types/memory.py | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 9f25f613..53e2a3b5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 13
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-14d23949fc9a5cf375c542a7a2bda08334079fab55f43b80a3d94ede34244da3.yml
-openapi_spec_hash: b80c4f0e0311ff9125dfe27a5a405395
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ec1420af27ac837f49a977cb95726af45a5ee5b5cd367e54b8a611de47ee3c84.yml
+openapi_spec_hash: 0fc5dd84801ee8f46a9b5d0941bdefda
config_hash: bf6196b98ec72829d458bc45ccd5a5f9
diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py
index 021ba64d..c5e83e05 100644
--- a/src/hyperspell/types/memory.py
+++ b/src/hyperspell/types/memory.py
@@ -96,3 +96,5 @@ class Memory(BaseModel):
score: Optional[float] = None
"""The relevance of the resource to the query"""
+
+ title: Optional[str] = None
From 37def01e5290efee8228c0e81f6ef2c9e7fb2b0b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 16:21:42 +0000
Subject: [PATCH 3/7] feat(api): update via SDK Studio
---
.stats.yml | 6 +++---
README.md | 8 ++++----
src/hyperspell/types/memory.py | 2 --
src/hyperspell/types/memory_status.py | 3 +++
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 53e2a3b5..2f5d5d12 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 13
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ec1420af27ac837f49a977cb95726af45a5ee5b5cd367e54b8a611de47ee3c84.yml
-openapi_spec_hash: 0fc5dd84801ee8f46a9b5d0941bdefda
-config_hash: bf6196b98ec72829d458bc45ccd5a5f9
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-e8dc461bfd68745a68eddc289ac15c0c5d222f20e81a5c61b11ee3807a75d839.yml
+openapi_spec_hash: 24eece3c79152b96c2cc0f398cf9d6af
+config_hash: a6483af9d17ae2cb7e8c3f86037b05fa
diff --git a/README.md b/README.md
index 41ec77f4..9a5f7b4a 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ client = Hyperspell(
memory_status = client.memories.add(
text="text",
)
-print(memory_status.resource_id)
+print(memory_status.id)
```
While you can provide an `api_key` keyword argument,
@@ -61,7 +61,7 @@ async def main() -> None:
memory_status = await client.memories.add(
text="text",
)
- print(memory_status.resource_id)
+ print(memory_status.id)
asyncio.run(main())
@@ -96,7 +96,7 @@ async def main() -> None:
memory_status = await client.memories.add(
text="text",
)
- print(memory_status.resource_id)
+ print(memory_status.id)
asyncio.run(main())
@@ -350,7 +350,7 @@ response = client.memories.with_raw_response.add(
print(response.headers.get('X-My-Header'))
memory = response.parse() # get the object that `memories.add()` would have returned
-print(memory.resource_id)
+print(memory.id)
```
These methods return an [`APIResponse`](https://github.com/hyperspell/python-sdk/tree/main/src/hyperspell/_response.py) object.
diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py
index c5e83e05..021ba64d 100644
--- a/src/hyperspell/types/memory.py
+++ b/src/hyperspell/types/memory.py
@@ -96,5 +96,3 @@ class Memory(BaseModel):
score: Optional[float] = None
"""The relevance of the resource to the query"""
-
- title: Optional[str] = None
diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py
index 3473d663..6d061f77 100644
--- a/src/hyperspell/types/memory_status.py
+++ b/src/hyperspell/types/memory_status.py
@@ -8,6 +8,9 @@
class MemoryStatus(BaseModel):
+ id: int
+ """Deprecated: refer to documents by source and resource_id instead"""
+
resource_id: str
source: Literal[
From 853645f31184d6be577afe6ef7e872bca5198b3c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 16:22:05 +0000
Subject: [PATCH 4/7] feat(api): api update
---
.stats.yml | 4 ++--
README.md | 8 ++++----
src/hyperspell/types/memory.py | 2 ++
src/hyperspell/types/memory_status.py | 3 ---
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 2f5d5d12..304a8de4 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 13
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-e8dc461bfd68745a68eddc289ac15c0c5d222f20e81a5c61b11ee3807a75d839.yml
-openapi_spec_hash: 24eece3c79152b96c2cc0f398cf9d6af
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ec1420af27ac837f49a977cb95726af45a5ee5b5cd367e54b8a611de47ee3c84.yml
+openapi_spec_hash: 0fc5dd84801ee8f46a9b5d0941bdefda
config_hash: a6483af9d17ae2cb7e8c3f86037b05fa
diff --git a/README.md b/README.md
index 9a5f7b4a..41ec77f4 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ client = Hyperspell(
memory_status = client.memories.add(
text="text",
)
-print(memory_status.id)
+print(memory_status.resource_id)
```
While you can provide an `api_key` keyword argument,
@@ -61,7 +61,7 @@ async def main() -> None:
memory_status = await client.memories.add(
text="text",
)
- print(memory_status.id)
+ print(memory_status.resource_id)
asyncio.run(main())
@@ -96,7 +96,7 @@ async def main() -> None:
memory_status = await client.memories.add(
text="text",
)
- print(memory_status.id)
+ print(memory_status.resource_id)
asyncio.run(main())
@@ -350,7 +350,7 @@ response = client.memories.with_raw_response.add(
print(response.headers.get('X-My-Header'))
memory = response.parse() # get the object that `memories.add()` would have returned
-print(memory.id)
+print(memory.resource_id)
```
These methods return an [`APIResponse`](https://github.com/hyperspell/python-sdk/tree/main/src/hyperspell/_response.py) object.
diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py
index 021ba64d..c5e83e05 100644
--- a/src/hyperspell/types/memory.py
+++ b/src/hyperspell/types/memory.py
@@ -96,3 +96,5 @@ class Memory(BaseModel):
score: Optional[float] = None
"""The relevance of the resource to the query"""
+
+ title: Optional[str] = None
diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py
index 6d061f77..3473d663 100644
--- a/src/hyperspell/types/memory_status.py
+++ b/src/hyperspell/types/memory_status.py
@@ -8,9 +8,6 @@
class MemoryStatus(BaseModel):
- id: int
- """Deprecated: refer to documents by source and resource_id instead"""
-
resource_id: str
source: Literal[
From 6bc9bf232cf63d2c453da503e3e6c048dba00602 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 16:36:27 +0000
Subject: [PATCH 5/7] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index 304a8de4..058f122b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 13
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ec1420af27ac837f49a977cb95726af45a5ee5b5cd367e54b8a611de47ee3c84.yml
openapi_spec_hash: 0fc5dd84801ee8f46a9b5d0941bdefda
-config_hash: a6483af9d17ae2cb7e8c3f86037b05fa
+config_hash: 7e89b01037138060a2d7fa13e6025469
From 5d3bc9c68523ff572bb27e8d77e24a2819f6e6be Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 19:38:56 +0000
Subject: [PATCH 6/7] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
api.md | 3 +-
src/hyperspell/resources/auth.py | 51 ++++++++++++++++++
src/hyperspell/types/__init__.py | 1 +
.../types/auth_delete_user_response.py | 11 ++++
tests/api_resources/test_auth.py | 52 ++++++++++++++++++-
6 files changed, 118 insertions(+), 4 deletions(-)
create mode 100644 src/hyperspell/types/auth_delete_user_response.py
diff --git a/.stats.yml b/.stats.yml
index 058f122b..36517827 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 13
+configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ec1420af27ac837f49a977cb95726af45a5ee5b5cd367e54b8a611de47ee3c84.yml
openapi_spec_hash: 0fc5dd84801ee8f46a9b5d0941bdefda
-config_hash: 7e89b01037138060a2d7fa13e6025469
+config_hash: 985dd1bd217ba3c5c5b614da08d43e5f
diff --git a/api.md b/api.md
index f59feeb3..6a65d499 100644
--- a/api.md
+++ b/api.md
@@ -75,10 +75,11 @@ Methods:
Types:
```python
-from hyperspell.types import Token, AuthMeResponse
+from hyperspell.types import Token, AuthDeleteUserResponse, AuthMeResponse
```
Methods:
+- client.auth.delete_user() -> AuthDeleteUserResponse
- client.auth.me() -> AuthMeResponse
- client.auth.user_token(\*\*params) -> Token
diff --git a/src/hyperspell/resources/auth.py b/src/hyperspell/resources/auth.py
index b9e17f87..a81f560e 100644
--- a/src/hyperspell/resources/auth.py
+++ b/src/hyperspell/resources/auth.py
@@ -20,6 +20,7 @@
from ..types.token import Token
from .._base_client import make_request_options
from ..types.auth_me_response import AuthMeResponse
+from ..types.auth_delete_user_response import AuthDeleteUserResponse
__all__ = ["AuthResource", "AsyncAuthResource"]
@@ -44,6 +45,25 @@ def with_streaming_response(self) -> AuthResourceWithStreamingResponse:
"""
return AuthResourceWithStreamingResponse(self)
+ def delete_user(
+ self,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> AuthDeleteUserResponse:
+ """Endpoint to delete user."""
+ return self._delete(
+ "/auth/delete",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=AuthDeleteUserResponse,
+ )
+
def me(
self,
*,
@@ -127,6 +147,25 @@ def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse:
"""
return AsyncAuthResourceWithStreamingResponse(self)
+ async def delete_user(
+ self,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> AuthDeleteUserResponse:
+ """Endpoint to delete user."""
+ return await self._delete(
+ "/auth/delete",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=AuthDeleteUserResponse,
+ )
+
async def me(
self,
*,
@@ -194,6 +233,9 @@ class AuthResourceWithRawResponse:
def __init__(self, auth: AuthResource) -> None:
self._auth = auth
+ self.delete_user = to_raw_response_wrapper(
+ auth.delete_user,
+ )
self.me = to_raw_response_wrapper(
auth.me,
)
@@ -206,6 +248,9 @@ class AsyncAuthResourceWithRawResponse:
def __init__(self, auth: AsyncAuthResource) -> None:
self._auth = auth
+ self.delete_user = async_to_raw_response_wrapper(
+ auth.delete_user,
+ )
self.me = async_to_raw_response_wrapper(
auth.me,
)
@@ -218,6 +263,9 @@ class AuthResourceWithStreamingResponse:
def __init__(self, auth: AuthResource) -> None:
self._auth = auth
+ self.delete_user = to_streamed_response_wrapper(
+ auth.delete_user,
+ )
self.me = to_streamed_response_wrapper(
auth.me,
)
@@ -230,6 +278,9 @@ class AsyncAuthResourceWithStreamingResponse:
def __init__(self, auth: AsyncAuthResource) -> None:
self._auth = auth
+ self.delete_user = async_to_streamed_response_wrapper(
+ auth.delete_user,
+ )
self.me = async_to_streamed_response_wrapper(
auth.me,
)
diff --git a/src/hyperspell/types/__init__.py b/src/hyperspell/types/__init__.py
index 1cb2bdab..5c43b83b 100644
--- a/src/hyperspell/types/__init__.py
+++ b/src/hyperspell/types/__init__.py
@@ -16,4 +16,5 @@
from .memory_delete_response import MemoryDeleteResponse as MemoryDeleteResponse
from .memory_search_response import MemorySearchResponse as MemorySearchResponse
from .memory_status_response import MemoryStatusResponse as MemoryStatusResponse
+from .auth_delete_user_response import AuthDeleteUserResponse as AuthDeleteUserResponse
from .integration_revoke_response import IntegrationRevokeResponse as IntegrationRevokeResponse
diff --git a/src/hyperspell/types/auth_delete_user_response.py b/src/hyperspell/types/auth_delete_user_response.py
new file mode 100644
index 00000000..64c8e293
--- /dev/null
+++ b/src/hyperspell/types/auth_delete_user_response.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+
+__all__ = ["AuthDeleteUserResponse"]
+
+
+class AuthDeleteUserResponse(BaseModel):
+ message: str
+
+ success: bool
diff --git a/tests/api_resources/test_auth.py b/tests/api_resources/test_auth.py
index f4d88ecb..207e4c13 100644
--- a/tests/api_resources/test_auth.py
+++ b/tests/api_resources/test_auth.py
@@ -9,7 +9,7 @@
from hyperspell import Hyperspell, AsyncHyperspell
from tests.utils import assert_matches_type
-from hyperspell.types import Token, AuthMeResponse
+from hyperspell.types import Token, AuthMeResponse, AuthDeleteUserResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -17,6 +17,31 @@
class TestAuth:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @parametrize
+ def test_method_delete_user(self, client: Hyperspell) -> None:
+ auth = client.auth.delete_user()
+ assert_matches_type(AuthDeleteUserResponse, auth, path=["response"])
+
+ @parametrize
+ def test_raw_response_delete_user(self, client: Hyperspell) -> None:
+ response = client.auth.with_raw_response.delete_user()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ auth = response.parse()
+ assert_matches_type(AuthDeleteUserResponse, auth, path=["response"])
+
+ @parametrize
+ def test_streaming_response_delete_user(self, client: Hyperspell) -> None:
+ with client.auth.with_streaming_response.delete_user() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ auth = response.parse()
+ assert_matches_type(AuthDeleteUserResponse, auth, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
def test_method_me(self, client: Hyperspell) -> None:
auth = client.auth.me()
@@ -87,6 +112,31 @@ class TestAsyncAuth:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @parametrize
+ async def test_method_delete_user(self, async_client: AsyncHyperspell) -> None:
+ auth = await async_client.auth.delete_user()
+ assert_matches_type(AuthDeleteUserResponse, auth, path=["response"])
+
+ @parametrize
+ async def test_raw_response_delete_user(self, async_client: AsyncHyperspell) -> None:
+ response = await async_client.auth.with_raw_response.delete_user()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ auth = await response.parse()
+ assert_matches_type(AuthDeleteUserResponse, auth, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_delete_user(self, async_client: AsyncHyperspell) -> None:
+ async with async_client.auth.with_streaming_response.delete_user() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ auth = await response.parse()
+ assert_matches_type(AuthDeleteUserResponse, auth, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
async def test_method_me(self, async_client: AsyncHyperspell) -> None:
auth = await async_client.auth.me()
From 9281091df030dc489999f1cbacff64d065f27935 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 19:48:11 +0000
Subject: [PATCH 7/7] release: 0.22.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 16 ++++++++++++++++
pyproject.toml | 2 +-
src/hyperspell/_version.py | 2 +-
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 86b0e83d..cb9d2541 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.21.0"
+ ".": "0.22.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01fe0a4f..10724ba7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## 0.22.0 (2025-08-06)
+
+Full Changelog: [v0.21.0...v0.22.0](https://github.com/hyperspell/python-sdk/compare/v0.21.0...v0.22.0)
+
+### Features
+
+* **api:** api update ([853645f](https://github.com/hyperspell/python-sdk/commit/853645f31184d6be577afe6ef7e872bca5198b3c))
+* **api:** api update ([e6c05cd](https://github.com/hyperspell/python-sdk/commit/e6c05cd496db6e9df09da720bd74e6c2f0f853b7))
+* **api:** update via SDK Studio ([5d3bc9c](https://github.com/hyperspell/python-sdk/commit/5d3bc9c68523ff572bb27e8d77e24a2819f6e6be))
+* **api:** update via SDK Studio ([37def01](https://github.com/hyperspell/python-sdk/commit/37def01e5290efee8228c0e81f6ef2c9e7fb2b0b))
+
+
+### Chores
+
+* **internal:** fix ruff target version ([9454556](https://github.com/hyperspell/python-sdk/commit/945455659b4896b89be368476adeb8c062e8d520))
+
## 0.21.0 (2025-08-05)
Full Changelog: [v0.20.0...v0.21.0](https://github.com/hyperspell/python-sdk/compare/v0.20.0...v0.21.0)
diff --git a/pyproject.toml b/pyproject.toml
index 51f218bc..e446cb1f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "hyperspell"
-version = "0.21.0"
+version = "0.22.0"
description = "The official Python library for the hyperspell API"
dynamic = ["readme"]
license = "MIT"
diff --git a/src/hyperspell/_version.py b/src/hyperspell/_version.py
index c436a1d2..c89716fe 100644
--- a/src/hyperspell/_version.py
+++ b/src/hyperspell/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "hyperspell"
-__version__ = "0.21.0" # x-release-please-version
+__version__ = "0.22.0" # x-release-please-version