sdk/python/README.md
The Python SDK for SST lets you access linked resources in your Python Lambda functions.
pip install sst-sdk
Or with uv:
uv add sst-sdk
If you were previously installing the SDK from GitHub:
# Before
[project]
dependencies = ["sst"]
[tool.uv.sources]
sst = { git = "https://github.com/sst/sst", subdirectory = "sdk/python" }
Update your pyproject.toml to use the PyPI package instead:
# After
[project]
dependencies = ["sst-sdk"]
That's it — remove the [tool.uv.sources] entry for sst and replace the dependency name. No code changes needed; from sst import Resource works the same way.
Use Resource to access any resource linked to your function in sst.config.ts:
from sst import Resource
# Access linked resources by name
bucket_name = Resource.MyBucket.name
table_name = Resource.MyTable.name
Resources are defined and linked in your sst.config.ts:
const bucket = new sst.aws.Bucket("MyBucket");
new sst.aws.Function("MyFunction", {
handler: "handler.main",
link: [bucket],
});
The SDK reads resource bindings from encrypted environment variables set by SST at deploy time. In sst dev, resources are available automatically through the local development bridge.