Prerequisites
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
This tutorial uses a FastAPI retail application, the Aerospike Python SDK, and the Aerospike Voyager desktop tool. Install the following dependencies and clone the sample application repository before you start.
The sample application includes a Docker Compose file that runs a single-node Aerospike Database. You do not need to install Aerospike Database separately.
Required
Docker
Docker runs the single-node Aerospike Database for the sample application. Download and install Docker Desktop from the Docker website.
Verify Docker is running:
docker --versionThe output is similar to:
Docker version 27.0.0, build abc1234Python 3.10 or later
The sample application requires Python 3.10 or later (3.10 through 3.14).
-
Download Python for your operating system from python.org or use your system package manager. On macOS with Homebrew, run
brew install python@3.12. -
Open a new terminal and verify the version.
Terminal window python3 --versionThe output begins with
Python 3.1, for example:Python 3.12.4Any 3.10.x or later build is acceptable.
-
Confirm that
pipis available.Terminal window python3 -m pip --version
Aerospike Voyager
Aerospike Voyager is the desktop tool you use to inspect and edit data in your cluster. Voyager runs on macOS, Windows, and Linux.
Download Voyager from the Aerospike download page, install it, then launch it once to confirm it opens without errors. You connect Voyager to the database in the next step.
Sample application
Clone the workshop repository, which contains the FastAPI retail application, the local Aerospike Database Docker Compose file, and the JSON product data:
git clone https://github.com/aerospike-examples/aerospike-client-sdk-workshopcd aerospike-client-sdk-workshopOptional
Python virtual environment (recommended)
A virtual environment keeps the workshop dependencies separate from your system Python and other projects. Create one in the workshop repository after you clone it.
-
From the
aerospike-client-sdk-workshoprepository root, create a virtual environment named.venv.Terminal window python3 -m venv .venv -
Activate the environment.
Terminal window source .venv/bin/activateOn Windows, run
.venv\Scripts\activateinstead.Your shell prompt usually shows
(.venv)when the environment is active. -
Confirm that
pythonandpipresolve inside the environment.Terminal window python --versionpython -m pip --versionOn macOS and Linux, run
which pythonand confirm the path includes.venv. On Windows, runwhere pythoninstead.
Activate this environment again whenever you open a new terminal before you run pip install or start the FastAPI application in the next step.
An IDE with Python support
Editing Python source files is part of this tutorial. Any editor with Python support works. VS Code with the Python extension, PyCharm, or Cursor are common choices.
Verify the working tree
The repository contains the following top-level entries:
Directoryaerospike-client-sdk-workshop
Directoryconfig/
- …
Directorydata/
Directorystyles/ 200 product JSON files auto-loaded on first run
- …
Directorypython-server/ Python source code you edit in this tutorial
- …
Directoryspring-server/
- …
Directorywebsite/
- …
Directoryworkshop/
- …
- .gitignore
- docker-compose.yml runs the local single-node Aerospike Database
- guide-to-python-sdk.md
- guide-to-java-sdk.md
- new_client_tester_prompts_python.md
- README.md