Skip to main content

remnawave-client

Sync and async client for the Remnawave API, generated from the panel's OpenAPI specification.

pip install remnawave-client

Requires Python 3.11 or newer.

Versions

The library version equals the API version it was generated from. A tag exists for every minor release of the panel from 2.0 onwards, so pin the one matching your deployment:

pip install remnawave-client==3.0.0

Quick start

from remnawave import Remnawave

with Remnawave("https://panel.example.com", token) as rw:
    user = rw.users.get_user_by_username("zen")
    print(user.username, user.status, user.expire_at)

    for u in rw.users.iter_users():
        print(u.username)

The async client mirrors it:

import asyncio

from remnawave import AsyncRemnawave

async def main() -> None:
    async with AsyncRemnawave("https://panel.example.com", token) as rw:
        stats = await rw.system.get_stats()
        nodes = await rw.nodes.get_nodes()
        async for user in rw.users.iter_users():
            print(user.username)

asyncio.run(main())

More in examples/: pagination, partial updates, error handling, webhooks and swapping out the client's parts.

Errors

Everything the library raises inherits from RemnawaveError. Below it the hierarchy splits by cause: ApiError for anything the panel answered with, TransportError when the request never got a reply, SerializationError when the payload did not match the schema.

from remnawave.exceptions import NotFoundError

try:
    rw.users.get_user_by_id(42)
except NotFoundError as error:
    print(error.status, error.error_code)  # 404 'A025'

error_code is the panel's own code and is more specific than the HTTP status — branch on it when you need to tell cases apart.

Webhooks

from remnawave.webhooks import SIGNATURE_HEADER, WebhookReceiver

hooks = WebhookReceiver(secret=os.environ["WEBHOOK_SECRET_HEADER"])
event = hooks.receive(request.body, request.headers[SIGNATURE_HEADER])

if event.scope == "user":
    print(event.event, event.data.username)

Pass the raw request body: the signature covers those exact bytes, so re-serialising parsed JSON breaks verification.

Regenerating

src/remnawave/_generated/ is machine-written and must not be edited by hand. To target another panel version, drop its specification into specs/ and run:

python -m tools.codegen 3.4.3

Where the specification is wrong or awkward, overlay.yaml patches it before generation: type names, forced field types, fields kept out of repr. Editing the generated code directly would be lost on the next run; editing the vendored specification would be lost on the next update.

Release files for remnawave-client 2.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remnawave-client 2.2.6
File Size Uploaded
remnawave_client-2.2.6.tar.gz 31.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remnawave-client 2.2.6
File Interpreter ABI Platform
remnawave_client-2.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 82.6 kB

Release files / remnawave_client-2.2.6.tar.gz

Download URL remnawave_client-2.2.6.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
78b6cfe2c7e78aae11bf8b6af99b98b3739d9217dcf2e0aeeb80077b1f9ff6c6
BLAKE2b-256 checksum
How to use checksums
af1c31396a8c9bef4c2941e1a778a917ccecc3bdb0503d8db7652ed581526226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / remnawave_client-2.2.6-py3-none-any.whl

Download URL remnawave_client-2.2.6-py3-none-any.whl
Size 51.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d434ec4ec666c123a0ade6042c278eab1923249ff311e744615ba4c751a3dc66
BLAKE2b-256 checksum
How to use checksums
d2cdeb271f8d0733e387f76138e12cf1bbb5eb2a045f13bf0efeddf7dc78f749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

3.4.4

2 release files

3.4.3

2 release files

3.3.2

2 release files

3.2.3

2 release files

3.1.0

1 release file

3.0.0

2 release files

2.8.1

2 release files

2.7.4

2 release files

2.6.4

1 release file

2.5.7

1 release file

2.4.4

2 release files

2.3.2

2 release files

This release

2.2.6 This release

2 release files

2.0.8

2 release 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