Skip to main content

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

  1. 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
  1. Point the store at your cluster (Default):

    • AEROSPIKE_HOST=127.0.0.1
    • AEROSPIKE_PORT=3000
    • AEROSPIKE_NAMESPACE=langgraph (default namespace for the store)
    • AEROSPIKE_SET=store (default set name)
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_store_aerospike-0.2.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_store_aerospike-0.2.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_store_aerospike-0.2.0.tar.gz.

File metadata

File hashes

Hashes for langgraph_store_aerospike-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cdab73de3e22852d4fc4ea10dfbe47f134559ff984add03b216bdfc600c27795
MD5 4e1cbf45f9513f7724eea737742c2716
BLAKE2b-256 e4b2d2ca5b2fadc831c8ff712160ae653be8d6171e81c2a52c53bc37826553d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for langgraph_store_aerospike-0.2.0.tar.gz:

Publisher: release-store.yml on aerospike/langgraph-aerospike

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langgraph_store_aerospike-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_store_aerospike-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b33fd89c139c98673100e38fa2bc6db215e50c1d3e22ddff6babe6212c03022
MD5 a358896c383bfbbb3d0227362931fa7b
BLAKE2b-256 089f44fd37337ac081c163b2d9ec9450a4b1b4aac44e363a7d9471888f5597a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for langgraph_store_aerospike-0.2.0-py3-none-any.whl:

Publisher: release-store.yml on aerospike/langgraph-aerospike

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page