strands-dynamodb-storage
An Amazon DynamoDB implementation of the Strands Agents unified Storage interface — durable bytes-under-string-keys that backs session snapshots, context offloading, memory stores, and anything else that consumes strands.storage.Storage.
pip install strands-dynamodb-storage
from strands.storage import Storage
from strands_dynamodb_storage import DynamoDBStorage
storage = DynamoDBStorage("strands_storage") # table auto-created if absent
assert isinstance(storage, Storage)
await storage.write("sessions/abc/state.json", b"...bytes...")
data = await storage.read("sessions/abc/state.json") # -> bytes | None
keys = await storage.list("sessions/") # sorted, prefix-matched
await storage.delete("sessions/abc/state.json") # no-op if absent
Interface
| Method | Behaviour |
|---|---|
write(key, data) |
Upsert bytes under a /-separated key |
read(key) |
Return the bytes, or None if absent |
delete(key) |
Delete the key (no-op if missing) |
list(prefix) |
Full keys matching the prefix, sorted ascending |
Data model
A single table with string keys PK (HASH) / SK (RANGE), billed PAY_PER_REQUEST and auto-created. Every value shares one partition (partition_value, default "storage") with the storage key as the sort key, so list(prefix) is an ordered begins_with query. For very large or high-throughput datasets this concentrates load on one partition — use separate tables or partition_values per namespace to spread it. Blocking boto3 calls run in a thread so the async interface never blocks the event loop.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strands_dynamodb_store-0.1.0.tar.gz.
File metadata
- Download URL: strands_dynamodb_store-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46496d38ce1277fda09b6fcb53cbdc722ccb56d61d37e3b82f7dc4753ab7f1fc
|
|
| MD5 |
4674b50ca3c593edc0c710984d9e9cac
|
|
| BLAKE2b-256 |
b0cefc12fb82935689ebde42b3359eb72e1887a851cebf051f7da1afef82adbc
|
File details
Details for the file strands_dynamodb_store-0.1.0-py3-none-any.whl.
File metadata
- Download URL: strands_dynamodb_store-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81ce05c42614769e56d604b9da807481bb3cd63e8f88e25b1e116f661a58e077
|
|
| MD5 |
b90d7befa30b6c96089b7082fe4b81a1
|
|
| BLAKE2b-256 |
6d6305fdf4739e7a9f26521fc4d04e4290291cb2f5ca02ccf5f6e92efc49dd1b
|