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.
git clone https://github.com/aerospike/aerolab.git
git clone [email protected]:aerospike/aerolab.git
cd aerolab/scripts/aerolab-pythonclient
./runme.sh
./runme.sh run
./runme.sh attach
ls
./runme.sh destroy
./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
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. |