Skip to content

About

Async client for NanoKVM devices

Resources

Stars

15 stars

Watchers

2 watching

Forks

Latest commit

 

History

68 Commits

Folders and files

Repository files navigation

python-nanokvm

Async Python client for the Sipeed NanoKVM and NanoKVM Pro.

pip install nanokvm

Usage

import asyncio

from nanokvm.client import NanoKVMClient
from nanokvm.models import GpioType, MouseButton


async def main() -> None:
    async with NanoKVMClient("https://kvm.local/api/") as client:
        await client.authenticate("username", "password")

        await client.push_button(GpioType.POWER, duration_ms=1000)
        await client.paste_text("Hello\nworld!")
        await client.mouse_click(MouseButton.LEFT, 0.5, 0.5)

        async for frame in client.mjpeg_stream():
            frame.save("screen.jpg")
            break


asyncio.run(main())

The client detects the hardware and firmware, and raises NanoKVMNotSupportedError instead of calling an endpoint the device lacks.

Documentation

About

Async client for NanoKVM devices

Resources

Stars

15 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages