aerolab

Docs home

Quick build client - Python

This script allows for quick and easy deployment of a Python-based client library with sample code in a Docker container.

It can be used on its own, as part of an aerolab-buildenv script, or combined with the aerolab command.

Clone the repo

Using https

git clone https://github.com/aerospike/aerolab.git

Using git keys

git clone git@github.com:aerospike/aerolab.git

Enter the directory

cd aerolab/scripts/aerolab-pythonclient

Get usage help

./runme.sh

Create a new Python client container

./runme.sh run

Attach to the client container’s shell

./runme.sh attach
ls

Destroy the client container

./runme.sh destroy

Usage

./runme.sh 

Usage: ./runme.sh start|stop|destroy|run|get

  run     - create and start Client Node
  start   - start an existing, stopped, Client Node
  stop    - stop a running Client Node, without destroying it
  get     - get the IPs of Client Node
  attach  - attach to the client container
  destroy - stop and destroy the Client Node

Code samples

Once you have attached to the container, you will see the client example code in /root/clients.

There are 3 example code snippets:

Name Description
example_basic.py Does a basic database connect, writes a record and reads it back.
example_auth.py Does an authenticated database connect, writes a record and reads it back.
example_tls.py Does an authenticated database connect over TLS, writes a record and reads it back.