Skip to content

Publish Python SDK to PyPI as sst-sdk#6858

Open
subssn21 wants to merge 2 commits intoanomalyco:devfrom
subssn21:python-sdk-pypi-pr
Open

Publish Python SDK to PyPI as sst-sdk#6858
subssn21 wants to merge 2 commits intoanomalyco:devfrom
subssn21:python-sdk-pypi-pr

Conversation

@subssn21
Copy link
Copy Markdown
Contributor

@subssn21 subssn21 commented May 4, 2026

Summary

Publishes the SST Python SDK to PyPI as sst-sdk, so users can install with pip install sst-sdk or uv add sst-sdk instead of pointing at the git repo.

Changes (5 files)

  • sdk/python/pyproject.toml — Rename to sst-sdk, add PyPI metadata, hatch build config
  • sdk/python/README.md — Installation, migration guide, usage examples
  • sdk/python/PUBLISHING.md — One-time PyPI trusted publishing setup docs
  • .github/workflows/release.yml — Add Python SDK publish steps (after Rust, before Discord)
  • .github/workflows/check.yml — Pass GITHUB_TOKEN to docs build (fixes rate limit)

Migration for users

# Before
[project]
dependencies = ["sst"]

[tool.uv.sources]
sst = { git = "https://github.com/sst/sst", subdirectory = "sdk/python" }

# After
[project]
dependencies = ["sst-sdk"]

No code changes — from sst import Resource works the same.

Setup required before first publish

Configure trusted publishing on PyPI for sst-sdk (details in sdk/python/PUBLISHING.md).

- Rename package to sst-sdk (sst is taken on PyPI), import stays 'from sst import Resource'
- Add PyPI metadata: classifiers, keywords, license, project URLs
- Add hatch build config targeting src/sst for correct import name
- Add Python SDK publish steps to release.yml (alongside JS and Rust)
- Add PUBLISHING.md with one-time PyPI trusted publishing setup
- Expand README with installation, migration guide, and usage examples
- Pass GITHUB_TOKEN to docs build in check.yml to avoid rate limiting
env:
CARGO_REGISTRY_TOKEN: ${{ steps.crates-auth.outputs.token }}

- name: Release Python SDK
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "Release" here correct? aren't we building the sdk? not sure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really building as there's nothing to compile or anything. It's just bundling the files and pushing it to pypi. Don't think it matters, whichever you want.

Comment thread sdk/python/pyproject.toml Outdated
[project.urls]
Homepage = "https://sst.dev"
Documentation = "https://sst.dev/docs/reference/sdk/"
Repository = "https://github.com/sst/sst"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should update this URLs to use anomalyco in the org name

Comment thread sdk/python/pyproject.toml Outdated

[project.urls]
Homepage = "https://sst.dev"
Documentation = "https://sst.dev/docs/reference/sdk/"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can add here sdk#python so it links directly?

Comment thread sdk/python/README.md Outdated
uv add sst-sdk
```

> **Note**: When deploying with SST, the SDK is automatically included — you don't need to install it manually. This package is for local development and testing.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this true? i don't see any changes made to the function or python runtime

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also if this is the case, why would people need to do uv add sst-sdk?

Comment thread sdk/python/README.md Outdated
- [SST Documentation](https://sst.dev/docs/)
- [SDK Reference](https://sst.dev/docs/reference/sdk/)
- [Python on SST](https://sst.dev/docs/examples/#aws-lambda-python)
- [GitHub](https://github.com/sst/sst)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here with the URLs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants