pip install nebula-python

    1. from nebula.graph import ttypes
    2. from nebula.ConnectionPool import ConnectionPool
    3. from nebula.Client import GraphClient
    4. connection_pool = ConnectionPool('127.0.0.1', 3699)
    5. client = GraphClient(connection_pool)
    6. auth_resp = client.authenticate('user', 'password')
    7. query_resp = client.execute_query('SHOW SPACES') # 执行语句
    8. client.sign_out()
    9. connection_pool.close()