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
31 changes: 31 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/supermemoryai/python-sdk/actions/workflows/publish-pypi.yml
name: Publish PyPI
on:
workflow_dispatch:

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Publish to PyPI
run: |
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.SUPERMEMORY_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'supermemoryai/python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
PYPI_TOKEN: ${{ secrets.SUPERMEMORY_PYPI_TOKEN || secrets.PYPI_TOKEN }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0-alpha.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-f7a84a68f7d3173627cb589cec436ed7e89c98b2c3e66bbf42549da7346f3560.yml
openapi_spec_hash: 40877051c2167db483e240b4226d840f
config_hash: 77849fd95b1e7c5a1691ab43ea3b180a
config_hash: eb32087403f958eead829e810f5a71b8
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

## 0.1.0-alpha.1 (2025-04-29)

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

### Features

* **api:** add filtering in list memories endpoint ([5d86a70](https://github.com/supermemoryai/python-sdk/commit/5d86a703c41b0ce90c8ac61f2eccd6c83f79c176))
* **api:** api update ([924681b](https://github.com/supermemoryai/python-sdk/commit/924681b37fe9492f316be15559df2644e7660842))
* **api:** api update ([02e6b69](https://github.com/supermemoryai/python-sdk/commit/02e6b6940d3e9a7d3bfa61af801bcfa5e1a11529))
* **api:** api update ([7754bba](https://github.com/supermemoryai/python-sdk/commit/7754bba34d6a99d903acb7439caccbe5ab9aa598))
* **api:** api update ([b15aa2f](https://github.com/supermemoryai/python-sdk/commit/b15aa2f8c7772f84485e610d5352e68c9f4b367b))
* **api:** api update ([0dded4d](https://github.com/supermemoryai/python-sdk/commit/0dded4d6be51807c0a295495684bdb6aa5f853d1))
* **api:** api update ([3a4c540](https://github.com/supermemoryai/python-sdk/commit/3a4c540b328cdfb4b9aba4e7f3a9a5def657e753))
* **api:** api update ([c700956](https://github.com/supermemoryai/python-sdk/commit/c700956b44689bb82d054d2ffabc49a902be413b))
* **api:** api update ([bc6255a](https://github.com/supermemoryai/python-sdk/commit/bc6255addc8757d56d803593913db96e9b12a4e1))
* **api:** api update ([2abae10](https://github.com/supermemoryai/python-sdk/commit/2abae10ee88440ef931f7a127cb365c56d80a45d))
* **api:** api update ([7d263ce](https://github.com/supermemoryai/python-sdk/commit/7d263cefd8242b701e96b181caf6e2b473f7acac))
* **api:** api update ([ae64ee9](https://github.com/supermemoryai/python-sdk/commit/ae64ee969401c34da3704278bc05996cecc2214e))
* **api:** api update ([e5b0dc5](https://github.com/supermemoryai/python-sdk/commit/e5b0dc54ccebf278fb3d26cce334daa816bc5324))
* **api:** api update ([3d891f5](https://github.com/supermemoryai/python-sdk/commit/3d891f569dcec80be6b25757bd0f7fd41366b86c))
* **api:** api update ([1cfd461](https://github.com/supermemoryai/python-sdk/commit/1cfd4616cd5230a3eedc01b4b6cb3fc2ad6828df))
* **api:** api update ([775acf2](https://github.com/supermemoryai/python-sdk/commit/775acf29ed6814a9e00928a21d7e1b269bd1c827))


### Bug Fixes

* **pydantic v1:** more robust ModelField.annotation check ([7ab1994](https://github.com/supermemoryai/python-sdk/commit/7ab19942fc0ec181a3ada4c2748cef5c6f604f86))


### Chores

* broadly detect json family of content-type headers ([4adab85](https://github.com/supermemoryai/python-sdk/commit/4adab85222033e3ab74864916e3913590c2e3983))
* **ci:** add timeout thresholds for CI jobs ([6f41dd1](https://github.com/supermemoryai/python-sdk/commit/6f41dd1bcde3a7bc32c02b5e9fe301699274a19f))
* **ci:** only use depot for staging repos ([380881a](https://github.com/supermemoryai/python-sdk/commit/380881ab4ca3cc2b121f2fc4d16a567afd6bc763))
* **client:** minor internal fixes ([1d88cf8](https://github.com/supermemoryai/python-sdk/commit/1d88cf891c3bfb06983f28fd7bc3365e92c45f84))
* configure new SDK language ([2aa9714](https://github.com/supermemoryai/python-sdk/commit/2aa971422b0eeddb9319fe6780fcd4bfd5a9b6c7))
* **internal:** base client updates ([2d628e4](https://github.com/supermemoryai/python-sdk/commit/2d628e42bdfdee7dbda8e177950b93efc3f0875d))
* **internal:** bump pyright version ([ab4080a](https://github.com/supermemoryai/python-sdk/commit/ab4080a27dc73e5956fc663449720ece5966f383))
* **internal:** codegen related update ([072db72](https://github.com/supermemoryai/python-sdk/commit/072db7257871c72e512c6776cfe680c2fb5df738))
* **internal:** fix list file params ([67f4ba4](https://github.com/supermemoryai/python-sdk/commit/67f4ba4b3f89f42bd0f17c5bd88fb4663e3dbf1b))
* **internal:** import reformatting ([154b1c5](https://github.com/supermemoryai/python-sdk/commit/154b1c58b7fd421aa2039cfb4438b72e2cbe4d38))
* **internal:** minor formatting changes ([f07f0b9](https://github.com/supermemoryai/python-sdk/commit/f07f0b9dbc8c5f0ef4d3c4acfa980d991aba3943))
* **internal:** refactor retries to not use recursion ([63072f1](https://github.com/supermemoryai/python-sdk/commit/63072f131bca572e22af65c2c8b3b42f5e5d866a))
* **internal:** update models test ([24d7e92](https://github.com/supermemoryai/python-sdk/commit/24d7e92ceed67b23dc0189d36d30c8eb8bb2d075))
* **internal:** update pyright settings ([211f7e9](https://github.com/supermemoryai/python-sdk/commit/211f7e9f03d8ff06f680364b8cfb1c38dde54935))
* update SDK settings ([cc260f1](https://github.com/supermemoryai/python-sdk/commit/cc260f124b2858bfd9495a8da074fd20890f3f10))
* update SDK settings ([937b5cb](https://github.com/supermemoryai/python-sdk/commit/937b5cb5e302e009bfc7475c4f942d4f5c24bcdd))
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ If you’d like to use the repository from source, you can either install from g
To install via git:

```sh
$ pip install git+ssh://git@github.com/stainless-sdks/supermemory-python.git
$ pip install git+ssh://git@github.com/supermemoryai/python-sdk.git
```

Alternatively, you can build from source and install the wheel file:
Expand Down Expand Up @@ -121,7 +121,7 @@ the changes aren't made through the automated pipeline, you may want to make rel

### Publish with a GitHub workflow

You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/supermemory-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/supermemoryai/python-sdk/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.

### Publish manually

Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ The REST API documentation can be found on [docs.supermemory.com](https://docs.s
## Installation

```sh
# install from this staging repo
pip install git+ssh://git@github.com/stainless-sdks/supermemory-python.git
# install from PyPI
pip install --pre supermemory
```

> [!NOTE]
> Once this package is [published to PyPI](https://app.stainless.com/docs/guides/publish), this will become: `pip install --pre supermemory`

## Usage

The full API of this library can be found in [api.md](api.md).
Expand Down Expand Up @@ -218,9 +215,9 @@ memory = response.parse() # get the object that `memory.create()` would have re
print(memory.id)
```

These methods return an [`APIResponse`](https://github.com/stainless-sdks/supermemory-python/tree/main/src/supermemory/_response.py) object.
These methods return an [`APIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) object.

The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/supermemory-python/tree/main/src/supermemory/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
The async client returns an [`AsyncAPIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.

#### `.with_streaming_response`

Expand Down Expand Up @@ -326,7 +323,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/supermemory-python/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/supermemoryai/python-sdk/issues) with questions, bugs, or suggestions.

### Determining the installed version

Expand Down
21 changes: 21 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

errors=()

if [ -z "${PYPI_TOKEN}" ]; then
errors+=("The SUPERMEMORY_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
echo -e "Found the following errors in the release environment:\n"

for error in "${errors[@]}"; do
echo -e "- $error\n"
done

exit 1
fi

echo "The environment is ready to push releases!"
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "0.0.1-alpha.0"
version = "0.1.0-alpha.1"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -34,8 +34,8 @@ classifiers = [
]

[project.urls]
Homepage = "https://github.com/stainless-sdks/supermemory-python"
Repository = "https://github.com/stainless-sdks/supermemory-python"
Homepage = "https://github.com/supermemoryai/python-sdk"
Repository = "https://github.com/supermemoryai/python-sdk"


[tool.rye]
Expand Down Expand Up @@ -121,7 +121,7 @@ path = "README.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
# replace relative links with absolute links
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
replacement = '[\1](https://github.com/stainless-sdks/supermemory-python/tree/main/\g<2>)'
replacement = '[\1](https://github.com/supermemoryai/python-sdk/tree/main/\g<2>)'

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand Down
66 changes: 66 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"release-type": "python",
"extra-files": [
"src/supermemory/_version.py"
]
}
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__ = "0.0.1-alpha.0"
__version__ = "0.1.0-alpha.1" # x-release-please-version
8 changes: 4 additions & 4 deletions src/supermemory/resources/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def with_raw_response(self) -> ConnectionResourceWithRawResponse:
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#accessing-raw-response-data-eg-headers
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
"""
return ConnectionResourceWithRawResponse(self)

Expand All @@ -39,7 +39,7 @@ def with_streaming_response(self) -> ConnectionResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#with_streaming_response
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
"""
return ConnectionResourceWithStreamingResponse(self)

Expand Down Expand Up @@ -128,7 +128,7 @@ def with_raw_response(self) -> AsyncConnectionResourceWithRawResponse:
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#accessing-raw-response-data-eg-headers
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
"""
return AsyncConnectionResourceWithRawResponse(self)

Expand All @@ -137,7 +137,7 @@ def with_streaming_response(self) -> AsyncConnectionResourceWithStreamingRespons
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#with_streaming_response
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
"""
return AsyncConnectionResourceWithStreamingResponse(self)

Expand Down
8 changes: 4 additions & 4 deletions src/supermemory/resources/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def with_raw_response(self) -> MemoryResourceWithRawResponse:
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#accessing-raw-response-data-eg-headers
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
"""
return MemoryResourceWithRawResponse(self)

Expand All @@ -43,7 +43,7 @@ def with_streaming_response(self) -> MemoryResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#with_streaming_response
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
"""
return MemoryResourceWithStreamingResponse(self)

Expand Down Expand Up @@ -228,7 +228,7 @@ def with_raw_response(self) -> AsyncMemoryResourceWithRawResponse:
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#accessing-raw-response-data-eg-headers
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
"""
return AsyncMemoryResourceWithRawResponse(self)

Expand All @@ -237,7 +237,7 @@ def with_streaming_response(self) -> AsyncMemoryResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/stainless-sdks/supermemory-python#with_streaming_response
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
"""
return AsyncMemoryResourceWithStreamingResponse(self)

Expand Down
Loading
Loading