Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhoreeq/yctl
Control Yggdrasil node with Python.
https://github.com/zhoreeq/yctl
python yggdrasil
Last synced: about 2 months ago
JSON representation
Control Yggdrasil node with Python.
- Host: GitHub
- URL: https://github.com/zhoreeq/yctl
- Owner: zhoreeq
- License: lgpl-3.0
- Created: 2019-11-06T08:28:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-20T17:25:16.000Z (almost 3 years ago)
- Last Synced: 2024-10-31T00:24:02.988Z (2 months ago)
- Topics: python, yggdrasil
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 11
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yctl
Control [Yggdrasil](https://yggdrasil-network.github.io/) node with Python.```
pip install yctl
```## API
[Yggdrasil's control commands](https://yggdrasil-network.github.io/admin.html)
translated from camelCase to pythonic snake\_case methods. For example,
`getSelf` becomes `Control.get_self()`Supports keepalive mode if instantiated with `keepalive=True`.
## Example
```python3
import asyncio
import yctlasync 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())
```