Skip to content

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:

Terminal window
docker --version

The output is similar to:

Docker version 27.0.0, build abc1234
Python 3.10 or later

The sample application requires Python 3.10 or later (3.10 through 3.14).

  1. 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.

  2. Open a new terminal and verify the version.

    Terminal window
    python3 --version

    The output begins with Python 3.1, for example:

    Python 3.12.4

    Any 3.10.x or later build is acceptable.

  3. Confirm that pip is 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:

Terminal window
git clone https://github.com/aerospike-examples/aerospike-client-sdk-workshop
cd aerospike-client-sdk-workshop

Optional

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.

  1. From the aerospike-client-sdk-workshop repository root, create a virtual environment named .venv.

    Terminal window
    python3 -m venv .venv
  2. Activate the environment.

    Terminal window
    source .venv/bin/activate

    On Windows, run .venv\Scripts\activate instead.

    Your shell prompt usually shows (.venv) when the environment is active.

  3. Confirm that python and pip resolve inside the environment.

    Terminal window
    python --version
    python -m pip --version

    On macOS and Linux, run which python and confirm the path includes .venv. On Windows, run where python instead.

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