WIP
This is a thrift generated Python 3 client library for Apache Accumulo.
Thrift code is generated with thrift -r --gen py proxy.thrift
of Accumulo 1.8.1.
These examples are in Python 3.6.
transport_socket: TSocket.TSocket = TSocket.TSocket('server', 42424)
transport: TTransport.TFramedTransport = TTransport.TFramedTransport(transport_socket)
protocol: TCompactProtocol.TCompactProtocol = TCompactProtocol.TCompactProtocol(transport)
transport.open()
client: AccumuloProxy.Client = AccumuloProxy.Client(protocol)
login: bytes = client.login("root", {"password": "q123456"})
table: str = "mytable"
if not client.tableExists(login, table):
client.createTable(login, table, True, TimeType.MILLIS)
print(client.listTables(login))
scanner: str = client.createScanner(login, table, ScanOptions())
results: ScanResult = client.nextK(scanner, 200)
for keyvalue in results.results:
print(keyvalue)
client.closeScanner(scanner)
pyaccumulo doesn't support Python 3 and I'm not sure if it's still maintained so I've created a new one.