Skip to content

Commit e8da506

Browse files
authored
Merge pull request #3 from supermemoryai/release-please--branches--main--changes--next
release: 3.0.0-alpha.2
2 parents 68370a4 + 95a924d commit e8da506

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+876
-1573
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- 'integrated/**'
88
- 'stl-preview-head/**'
99
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
1014

1115
jobs:
1216
lint:

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.0.0-alpha.1"
2+
".": "3.0.0-alpha.2"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 12
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-e6735b03c258b382c527550bb78042bdc3aad32a5cf564785dcb9f3fb13a2862.yml
3-
openapi_spec_hash: 8168fb51314d986893554e1cc935ca7d
1+
configured_endpoints: 8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-4c45e387cbdc7c80d75cdb8eb924cf92a3a48a0c10060fda917b83a7e454aef5.yml
3+
openapi_spec_hash: c859ac2e3429ad3663337b99c722f317
44
config_hash: 8477e3ee6fd596ab6ac911d052e4de79

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# Changelog
22

3+
## 3.0.0-alpha.2 (2025-06-24)
4+
5+
Full Changelog: [v3.0.0-alpha.1...v3.0.0-alpha.2](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.1...v3.0.0-alpha.2)
6+
7+
### Features
8+
9+
* **api:** api update ([75c22e3](https://github.com/supermemoryai/python-sdk/commit/75c22e3f2db8eda857ca184f5bd531ff736a1c8c))
10+
* **api:** api update ([fc586f7](https://github.com/supermemoryai/python-sdk/commit/fc586f729ac602946e95de2e61b6d27a8c3b1167))
11+
* **api:** api update ([5aefc85](https://github.com/supermemoryai/python-sdk/commit/5aefc85540c70a195c2c59a8e9cdd529ff124a3b))
12+
* **api:** api update ([200e97a](https://github.com/supermemoryai/python-sdk/commit/200e97acf9f2be46a3ffef069912da9e4d05a951))
13+
* **api:** api update ([2d9b26c](https://github.com/supermemoryai/python-sdk/commit/2d9b26ce58cf533ffbff6d7a002c8504752c1e6a))
14+
* **api:** api update ([c7e0c2c](https://github.com/supermemoryai/python-sdk/commit/c7e0c2ccae941136705f2328fe536870789cf52a))
15+
* **api:** api update ([486888d](https://github.com/supermemoryai/python-sdk/commit/486888da89d570779e132f3b810c7d1a4f59082a))
16+
* **api:** api update ([378085f](https://github.com/supermemoryai/python-sdk/commit/378085f0090ebf25bbc46d0e3947737457ae3a30))
17+
* **api:** api update ([7b7711f](https://github.com/supermemoryai/python-sdk/commit/7b7711f282eebbaf4edb462b1dc2ed5dfb1bc0fc))
18+
* **api:** api update ([c194b2e](https://github.com/supermemoryai/python-sdk/commit/c194b2ecbe42ebe5997aab4bc96fb7120a5f6b9c))
19+
* **api:** api update ([d517cbc](https://github.com/supermemoryai/python-sdk/commit/d517cbce5d74b7cd92d8921d16ba1bb025848549))
20+
* **api:** api update ([fa9f582](https://github.com/supermemoryai/python-sdk/commit/fa9f582226ed9dee9ea8196b78b9312938093465))
21+
* **api:** api update ([d1b2a97](https://github.com/supermemoryai/python-sdk/commit/d1b2a9719deb080c4b64ae97893ba139ecaebf68))
22+
* **api:** api update ([02180e2](https://github.com/supermemoryai/python-sdk/commit/02180e296f97a30626b183ba533f45879981cc62))
23+
* **api:** api update ([51586e6](https://github.com/supermemoryai/python-sdk/commit/51586e68f9ec7b04b7aba149142f6e550113c0b9))
24+
* **api:** api update ([cd4782d](https://github.com/supermemoryai/python-sdk/commit/cd4782de2b4f05196e6b3f37768de900a6a9e81d))
25+
* **api:** api update ([f58d93d](https://github.com/supermemoryai/python-sdk/commit/f58d93dc249798bdf62c00335c6b9bfdf8430795))
26+
* **api:** api update ([e95b77e](https://github.com/supermemoryai/python-sdk/commit/e95b77ee719a76f0eb22c56f07e90f05712de7cd))
27+
* **api:** api update ([beffc5e](https://github.com/supermemoryai/python-sdk/commit/beffc5e09b5aee9c1517453b2f5574881ecf5dd7))
28+
* **api:** api update ([173a337](https://github.com/supermemoryai/python-sdk/commit/173a337626cbd75d951d10a04e91261ed3a2a384))
29+
* **api:** api update ([02e8b00](https://github.com/supermemoryai/python-sdk/commit/02e8b0072cb84a52124f61f5d8f64d69809c7833))
30+
* **api:** api update ([1788d47](https://github.com/supermemoryai/python-sdk/commit/1788d476d76fd786ed495ee5f8048c301fae0799))
31+
* **api:** api update ([5bc5a86](https://github.com/supermemoryai/python-sdk/commit/5bc5a8611c00f3c77c1e3787f578c91577ddfbb0))
32+
* **api:** api update ([0c627bd](https://github.com/supermemoryai/python-sdk/commit/0c627bde6c7f6ef8d55e94993a612f34c75c7f80))
33+
* **client:** add follow_redirects request option ([abd637d](https://github.com/supermemoryai/python-sdk/commit/abd637db1e3642c0dcc609bf4cac3d0a2bdad061))
34+
* **client:** add support for aiohttp ([d376719](https://github.com/supermemoryai/python-sdk/commit/d37671920ac604d643c0d9edaaee08aaaea2d881))
35+
36+
37+
### Bug Fixes
38+
39+
* **client:** correctly parse binary response | stream ([b236e85](https://github.com/supermemoryai/python-sdk/commit/b236e8552e9393048b3541c2c41d969fd5a88ac0))
40+
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([f9bf3c1](https://github.com/supermemoryai/python-sdk/commit/f9bf3c135c6a6236c8ef0ee5d538843021448b9d))
41+
42+
43+
### Chores
44+
45+
* **ci:** enable for pull requests ([ec1b12b](https://github.com/supermemoryai/python-sdk/commit/ec1b12b9447ff582d80a0dedf75dc5c924aee6e4))
46+
* **docs:** grammar improvements ([1f9f018](https://github.com/supermemoryai/python-sdk/commit/1f9f01876a2754521ab8cc75c92634b05221f6c5))
47+
* **docs:** remove reference to rye shell ([23840c8](https://github.com/supermemoryai/python-sdk/commit/23840c8b8a67cb3b60e94c1eb74994d28b3508f1))
48+
* **internal:** codegen related update ([2b10aa8](https://github.com/supermemoryai/python-sdk/commit/2b10aa88d82e044d1a7df2bdd266209f4c130c8d))
49+
* **internal:** codegen related update ([c4039a7](https://github.com/supermemoryai/python-sdk/commit/c4039a7d5124d2c6719508830bf8067ebbb4fd58))
50+
* **internal:** update conftest.py ([355810b](https://github.com/supermemoryai/python-sdk/commit/355810b458222ddf405ec130cf43887cf7b2138d))
51+
* **readme:** update badges ([9415b50](https://github.com/supermemoryai/python-sdk/commit/9415b50222cea2e827a8e9c13525ad8e19df9ff2))
52+
* **tests:** add tests for httpx client instantiation & proxies ([a462f22](https://github.com/supermemoryai/python-sdk/commit/a462f2240dac23bf780f540ba39da3febbc561e7))
53+
* **tests:** run tests in parallel ([79f6359](https://github.com/supermemoryai/python-sdk/commit/79f6359beb267f85e273a5a3017283d9e231e78a))
54+
* **tests:** skip some failing tests on the latest python versions ([394e639](https://github.com/supermemoryai/python-sdk/commit/394e639fb904cd4c27b299f5960fd2f02f159b10))
55+
56+
57+
### Documentation
58+
59+
* **client:** fix httpx.Timeout documentation reference ([be3ccbd](https://github.com/supermemoryai/python-sdk/commit/be3ccbdebe4974592c670cb43ed572ced78e60a3))
60+
361
## 3.0.0-alpha.1 (2025-05-17)
462

563
Full Changelog: [v0.1.0-alpha.1...v3.0.0-alpha.1](https://github.com/supermemoryai/python-sdk/compare/v0.1.0-alpha.1...v3.0.0-alpha.1)

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ $ rye sync --all-features
1717
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
1818

1919
```sh
20-
$ rye shell
21-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20+
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
2221
$ source .venv/bin/activate
2322

2423
# now you can omit the `rye run` prefix

README.md

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Supermemory Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/supermemory.svg)](https://pypi.org/project/supermemory/)
3+
[![PyPI version](<https://img.shields.io/pypi/v/supermemory.svg?label=pypi%20(stable)>)](https://pypi.org/project/supermemory/)
44

55
The Supermemory Python library provides convenient access to the Supermemory REST API from any Python 3.8+
66
application. The library includes type definitions for all request params and response fields,
@@ -31,10 +31,10 @@ client = Supermemory(
3131
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
3232
)
3333

34-
response = client.search.execute(
35-
q="documents related to python",
34+
response = client.memories.add(
35+
content="This is a detailed article about machine learning concepts...",
3636
)
37-
print(response.results)
37+
print(response.id)
3838
```
3939

4040
While you can provide an `api_key` keyword argument,
@@ -57,42 +57,59 @@ client = AsyncSupermemory(
5757

5858

5959
async def main() -> None:
60-
response = await client.search.execute(
61-
q="documents related to python",
60+
response = await client.memories.add(
61+
content="This is a detailed article about machine learning concepts...",
6262
)
63-
print(response.results)
63+
print(response.id)
6464

6565

6666
asyncio.run(main())
6767
```
6868

6969
Functionality between the synchronous and asynchronous clients is otherwise identical.
7070

71-
## Using types
72-
73-
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
71+
### With aiohttp
7472

75-
- Serializing back into JSON, `model.to_json()`
76-
- Converting to a dictionary, `model.to_dict()`
73+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
7774

78-
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
75+
You can enable this by installing `aiohttp`:
7976

80-
## File uploads
77+
```sh
78+
# install from PyPI
79+
pip install --pre supermemory[aiohttp]
80+
```
8181

82-
Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
82+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8383

8484
```python
85-
from pathlib import Path
86-
from supermemory import Supermemory
85+
import os
86+
import asyncio
87+
from supermemory import DefaultAioHttpClient
88+
from supermemory import AsyncSupermemory
8789

88-
client = Supermemory()
8990

90-
client.memories.upload_file(
91-
file=Path("/path/to/file"),
92-
)
91+
async def main() -> None:
92+
async with AsyncSupermemory(
93+
api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted
94+
http_client=DefaultAioHttpClient(),
95+
) as client:
96+
response = await client.memories.add(
97+
content="This is a detailed article about machine learning concepts...",
98+
)
99+
print(response.id)
100+
101+
102+
asyncio.run(main())
93103
```
94104

95-
The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
105+
## Using types
106+
107+
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
108+
109+
- Serializing back into JSON, `model.to_json()`
110+
- Converting to a dictionary, `model.to_dict()`
111+
112+
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
96113

97114
## Handling errors
98115

@@ -163,7 +180,7 @@ client.with_options(max_retries=5).memories.add(
163180
### Timeouts
164181

165182
By default requests time out after 1 minute. You can configure this with a `timeout` option,
166-
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
183+
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
167184

168185
```python
169186
from supermemory import Supermemory

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Supermemory please follow the respective company's security reporting guidelines.
19+
or products provided by Supermemory, please follow the respective company's security reporting guidelines.
2020

2121
### Supermemory Terms and Policies
2222

23-
Please contact dhravya@supermemory.com for any questions or concerns regarding security of our services.
23+
Please contact dhravya@supermemory.com for any questions or concerns regarding the security of our services.
2424

2525
---
2626

api.md

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,15 @@
33
Types:
44

55
```python
6-
from supermemory.types import (
7-
MemoryUpdateResponse,
8-
MemoryListResponse,
9-
MemoryDeleteResponse,
10-
MemoryAddResponse,
11-
MemoryGetResponse,
12-
MemoryUploadFileResponse,
13-
)
6+
from supermemory.types import MemoryUpdateResponse, MemoryAddResponse, MemoryGetResponse
147
```
158

169
Methods:
1710

1811
- <code title="patch /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">update</a>(id, \*\*<a href="src/supermemory/types/memory_update_params.py">params</a>) -> <a href="./src/supermemory/types/memory_update_response.py">MemoryUpdateResponse</a></code>
19-
- <code title="get /v3/memories">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>
20-
- <code title="delete /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">delete</a>(id) -> <a href="./src/supermemory/types/memory_delete_response.py">MemoryDeleteResponse</a></code>
12+
- <code title="delete /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">delete</a>(id) -> None</code>
2113
- <code title="post /v3/memories">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>
2214
- <code title="get /v3/memories/{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>
23-
- <code title="post /v3/memories/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>
24-
25-
# Search
26-
27-
Types:
28-
29-
```python
30-
from supermemory.types import SearchExecuteResponse
31-
```
32-
33-
Methods:
34-
35-
- <code title="get /v3/search">client.search.<a href="./src/supermemory/resources/search.py">execute</a>(\*\*<a href="src/supermemory/types/search_execute_params.py">params</a>) -> <a href="./src/supermemory/types/search_execute_response.py">SearchExecuteResponse</a></code>
3615

3716
# Settings
3817

@@ -52,15 +31,10 @@ Methods:
5231
Types:
5332

5433
```python
55-
from supermemory.types import (
56-
ConnectionCreateResponse,
57-
ConnectionListResponse,
58-
ConnectionGetResponse,
59-
)
34+
from supermemory.types import ConnectionCreateResponse, ConnectionGetResponse
6035
```
6136

6237
Methods:
6338

6439
- <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>
65-
- <code title="get /v3/connections">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>
6640
- <code title="get /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">get</a>(connection_id) -> <a href="./src/supermemory/types/connection_get_response.py">ConnectionGetResponse</a></code>

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "supermemory"
3-
version = "3.0.0-alpha.1"
3+
version = "3.0.0-alpha.2"
44
description = "The official Python library for the supermemory API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -37,6 +37,8 @@ classifiers = [
3737
Homepage = "https://github.com/supermemoryai/python-sdk"
3838
Repository = "https://github.com/supermemoryai/python-sdk"
3939

40+
[project.optional-dependencies]
41+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
4042

4143
[tool.rye]
4244
managed = true
@@ -54,6 +56,7 @@ dev-dependencies = [
5456
"importlib-metadata>=6.7.0",
5557
"rich>=13.7.1",
5658
"nest_asyncio==1.6.0",
59+
"pytest-xdist>=3.6.1",
5760
]
5861

5962
[tool.rye.scripts]
@@ -125,7 +128,7 @@ replacement = '[\1](https://github.com/supermemoryai/python-sdk/tree/main/\g<2>)
125128

126129
[tool.pytest.ini_options]
127130
testpaths = ["tests"]
128-
addopts = "--tb=short"
131+
addopts = "--tb=short -n auto"
129132
xfail_strict = true
130133
asyncio_mode = "auto"
131134
asyncio_default_fixture_loop_scope = "session"

0 commit comments

Comments
 (0)