Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 694 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 694 Bytes

yctl

Control Yggdrasil node with Python.

pip install yctl

API

Yggdrasil's control commands translated from camelCase to pythonic snake_case methods. For example, getSelf becomes Control.get_self()

Supports keepalive mode if instantiated with keepalive=True.

Example

import asyncio
import yctl

async def main():
    ctl = yctl.Control(host="127.0.0.1", port=9001, keepalive=False)
    res = await ctl.get_peers()

    for k, v in res['response']['peers'].items():
        res = await ctl.debug_remote_get_self(v['key'])
        print(res)

asyncio.run(main())