Skip to main content

jnap

Async Python client for the Linksys JNAP API.

Installation

pip install jnap

Usage

import asyncio
import aiohttp
from jnap import JNAPClient

async def main():
    async with aiohttp.ClientSession() as session:
        client = JNAPClient("192.168.1.1", session, password="your-password")

        info = await client.get_device_info()
        print(info.description, info.serial_number)

        response = await client.get_devices()
        for device in response.devices:
            print(device.name, device.mac, device.ip_address)

asyncio.run(main())

API

JNAPClient(host, session, password=None, *, username="admin")

The main client class. Accepts an existing aiohttp.ClientSession so you can manage connection pooling and lifecycle yourself. If password is omitted, requests are sent without authorization, for routers that don't require it.

Methods

  • await client.get_device_info()GetDeviceInfoResponse
    Returns the router's description and serial number.

  • await client.get_devices()GetDevicesResponse
    Returns all devices currently connected to the router. Only devices with a known MAC address and an active connection are included.

Models

Class Fields
GetDeviceInfoResponse description, serial_number
GetDevicesResponse devices: list[JNAPDevice]
JNAPDevice mac, name, ip_address, hostname

Device names are resolved in priority order: user-assigned name → friendly name → device ID.

Exceptions

All exceptions inherit from JNAPError.

Exception Raised when
JNAPUnauthorizedError Authentication failed
JNAPUnknownActionError The device does not recognise the action
JNAPInvalidInputError The request was rejected as invalid

License

MIT

Download files

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

Source Distribution

jnap-0.2.0.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

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

jnap-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file jnap-0.2.0.tar.gz.

File metadata

  • Download URL: jnap-0.2.0.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jnap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a7a4410b9cdb1a6f7be21d9db211629947fc26b661b32f4bd3fd29db32152b70
MD5 1c22de879bf2a69c9f4b0d569f854aa2
BLAKE2b-256 11498e02b4e34024b3092ef09411b47e5ef461295178a861d9c54d1b5a33c6c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for jnap-0.2.0.tar.gz:

Publisher: publish.yml on jmalcic/jnap

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

File details

Details for the file jnap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: jnap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jnap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0cf793449580264cface128aa6da1622d7f8f3ad320f3f195e9399d0cc12f46
MD5 6f58ca124877128c43048ad47e2a2e16
BLAKE2b-256 2125df3819f2393c03a2054f96d72e435a5194ed2cf25b4ebe2693427fcae700

See more details on using hashes here.

Provenance

The following attestation bundles were made for jnap-0.2.0-py3-none-any.whl:

Publisher: publish.yml on jmalcic/jnap

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page