Esempio n. 1
0
import sys, socket

from aerospike_py.client import AerospikeClient
from aerospike_py.connection import SocketConnection

cli = AerospikeClient(SocketConnection(socket.create_connection((sys.argv[1], 3000))))
infokeys = cli.info([
    'build', 'edition', 'node', 'service', 'services', 'statistics', 'version'
])

for k, v in infokeys.items():
    print("%-15s: %s" % (k, v))
Esempio n. 2
0
import sys, socket

from pprint import pprint
from aerospike_py.connection import SocketConnection
from aerospike_py.client import AerospikeClient

hostname = sys.argv[1]
namespace = sys.argv[2]
key = sys.argv[3]

cli = AerospikeClient(SocketConnection(socket.create_connection((sys.argv[1], 3000))))

pprint(cli.get(namespace, "", key))