from kazoo.client import KazooClient
from kazoo.exceptions import NodeExistsError,ConnectionLoss
from kazoo.security import ACL, OPEN_ACL_UNSAFE
from kazoo.handlers.gevent import SequentialGeventHandler
from kazoo.handlers.threading import SequentialThreadingHandler
from kazoo.client import KazooClient from kazoo.exceptions import NodeExistsError,ConnectionLoss from kazoo.security import ACL, OPEN_ACL_UNSAFE from kazoo.handlers.gevent import SequentialGeventHandler from kazoo.handlers.threading import SequentialThreadingHandler
client = KazooClient(hosts='127.0.0.1:2181', handler=SequentialGeventHandler()) client.start_async()
while True: gevent.sleep(1) print(client.state, 'CONNECTED') client.create_async('/anode', b'fred') print("ok",client.get_async('/anode')[0], 'fred')
error print("ok",client.get_async('/anode')[0], 'fred') TypeError: 'gevent._event.AsyncResult' object is not subscriptable