Skip to main content

Async client for NanoKVM devices.

Project description

python-nanokvm

Async Python client for NanoKVM.

Usage

from aiohttp import ClientSession
from nanokvm.models import GpioType
from nanokvm.client import NanoKVMClient


async with ClientSession() as session:
    client = NanoKVMClient("http://kvm-8b76.local/api/", session)
    await client.authenticate("username", "password")

    dev = await client.get_info()
    hw = await client.get_hardware()
    gpio = await client.get_gpio()

    await client.paste_text("Hello\nworld!")

    async for frame in client.mjpeg_stream():
        print(frame)

    await client.push_button(GpioType.POWER, duration_ms=1000)

SSH Usage

from nanokvm.ssh_client import NanoKVMSSH

# Create SSH client
ssh = NanoKVMSSH("kvm-8b76.local")
await ssh.authenticate("password")

# Run commands
uptime = await ssh.run_command("cat /proc/uptime")
disk = await ssh.run_command("df -h /")

await ssh.disconnect()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanokvm-0.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanokvm-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file nanokvm-0.1.0.tar.gz.

File metadata

  • Download URL: nanokvm-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nanokvm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d10fc30ce06b537257c3daf1a7dda965bcd114b839fab617b20d65a0c4124f33
MD5 71f0469d82265efe2ea2ca5b16fd8746
BLAKE2b-256 36149b899b2fc93902125fe42c8434ecdcbccc600dc8b63feae8142fc58961b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanokvm-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on puddly/python-nanokvm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanokvm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nanokvm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nanokvm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c68d67d1abbcbcf3714320c8787e3f55809abc49e9e55fe9fb72cd0a65a2b1b6
MD5 7f54de5227fc2d1c6afaec4b74bd5b9c
BLAKE2b-256 ee5de9f120406449fec8f79e19b4550ba4c5fdb63c70d7f15a48989984295035

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanokvm-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on puddly/python-nanokvm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page