Aerospike-based store base for LangGraph
Project description
LangGraph Store Aerospike
Store LangGraph state and data in Aerospike using the provided AerospikeStore.
Installation
pip install -U langgraph-store-aerospike
Usage
- Bring up Aerospike locally using prebuilt Aerospike Docker Image:
docker run -d --name aerospike -p 3000-3002:3000-3002 container.aerospike.com/aerospike/aerospike-server
-
Point the store at your cluster (Default):
AEROSPIKE_HOST=127.0.0.1AEROSPIKE_PORT=3000AEROSPIKE_NAMESPACE=langgraph(default namespace for the store)AEROSPIKE_SET=store(default set name)
-
Use in your application:
import aerospike
from langgraph.store.aerospike import AerospikeStore
from langgraph.store.base import PutOp, GetOp, SearchOp
client = aerospike.client({"hosts": [("127.0.0.1", 3000)]}).connect()
store = AerospikeStore(
client=client,
namespace="test",
set="langgraph_store"
)
store.put(
namespace=("users", "profiles"),
key="user_123",
value={"name": "Alice", "age": 30}
)
# Get data
item = store.get(namespace=("users", "profiles"), key="user_123")
print(item.value) # {"name": "Alice", "age": 30}
# Batch operations
ops = [
PutOp(namespace=("documents",), key="doc1", value={"status": "draft"}),
PutOp(namespace=("documents",), key="doc2", value={"status": "published"}),
GetOp(namespace=("documents",), key="doc1"),
]
results = store.batch(ops)
# Search with filters
search_results = store.search(
namespace_prefix=("documents",),
filter={"status": {"$eq": "draft"}},
limit=10
)
# Delete item
store.delete(namespace=("users", "profiles"), key="user_123")
Project details
Release history Release notifications | RSS feed
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 langgraph_store_aerospike-0.1.0.tar.gz.
File metadata
- Download URL: langgraph_store_aerospike-0.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e3b69c666f9ab286930d937ba343db058f68302992993280eef55e2c867be1e
|
|
| MD5 |
397a35becb508f6bd6b219b8937d91ec
|
|
| BLAKE2b-256 |
a7cc63248e91f668beda9823b53b3d24e061beb3349e1e24280c88bc0fa37498
|
File details
Details for the file langgraph_store_aerospike-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langgraph_store_aerospike-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a517e8e4aa82605117c02682f7a0c10c9e178f08e0b7866b900f70aebd669b76
|
|
| MD5 |
172eb9d823629e0519790fe2b2052bdc
|
|
| BLAKE2b-256 |
c0b61c9f7f0ba68b7283142d582c392e46346a288d80c82c6d1a156561d2ebe0
|