Install and connect
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
Start Aerospike, install Python packages, and confirm AerospikeSessionService connects.
Start Aerospike Database
-
Start Aerospike in Docker:
Terminal window docker run -d --name aerospike -p 3000-3002:3000-3002 container.aerospike.com/aerospike/aerospike-server -
Verify the database is listening on port 3000:
Terminal window nc -z localhost 3000 && echo 'Aerospike database is running.'Expected result Connection to localhost port 3000 [tcp/hbci] succeeded!Aerospike database is running.
Install Python packages
-
Create and activate a virtual environment:
Terminal window python3.11 -m venv .venvsource .venv/bin/activateOn Windows, use
.venv\Scripts\activate. -
Upgrade pip and install packages:
Terminal window python -m pip install --upgrade pippython -m pip install "adk-aerospike>=0.1.0" "aerospike>=19"adk-aerospikepulls ingoogle-adk. Pin the Aerospike Python client at 19 or newer. Client 18.x lacksindex_single_value_create, whichAerospikeSessionServiceuses when it creates secondary indexes on first connect. -
Verify imports:
Terminal window python -c "from adk_aerospike import AerospikeSessionService; print('ok')"Expected result ok
Connect to Aerospike
-
Run a connectivity check:
Terminal window python -c "from adk_aerospike import AerospikeSessionServices = AerospikeSessionService.from_uri('aerospike://localhost:3000/test')s.close()print('Connected to Aerospike.')"Expected result Connected to Aerospike.Compare your terminal output to the expected result.
The service is ready. On the next pages you learn how sessions map to Aerospike records, then run the demo script.