Skip to content

jorektheglitch/yggdrasilctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This library provides a wrapper for Yggdrasil Admin API.

Installation

for Linux

pip3 install yggdrasilctl

for Windows

pip install yggdrasilctl

Usage

sync version

from pprint import pprint
from yggdrasilctl.sync import AdminAPI, APIError

api = AdminAPI() #unless otherwise specified it will connects to localhost:9001
try:
    info = api.getSelf()
except APIError as e:
    print(e)
else:
    pprint(info)

async version

import asyncio
from pprint import pprint
from yggdrasilctl import AdminAPI, APIError

async def main():
    api = AdminAPI()
    try:
        info = await api.getSelf()
    except APIError as e:
        print(e)
    else:
        pprint(info)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Detailed description of API methods

For details see documentation of Admin API.

Links

Yggdrasil project This library on PyPI