Skip to content

HuFlungDu/pylibmeshctrl

Repository files navigation

Project generated with PyScaffold

meshctrl

Library for remotely interacting with a MeshCentral server instance

Installation

pip install libmeshctrl

Usage

This module is implemented as a primarily asynchronous library (asyncio), mostly through the Session class. Because the library is asynchronous, you must wait for it to be initialized before interacting with the server. The preferred way to do this is to use the async context manager pattern:

import meshctrl

async with meshctrl.Session(url, **options):
    print(await session.list_users())
    ...

However, if you prefer to instantiate the object yourself, you can simply use the initialized property:

session = meshctrl.Session(url, **options)
await session.initialized.wait()

Note that, in this case, you will be rquired to clean up tho session using its close method.

Session Parameters

url: URL of meshcentral server to connect to. Should start with either "ws://" or "wss://".

options: optional parameters. Described at Read the Docs

API

API is documented in the API Docs

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.

About

Libmeshctrl implementation in python

Resources

License

Stars

Watchers

Forks

Packages

No packages published