A Python SDK for interacting with the Remnawave API.
Project description
Remnawave SDK
A Python SDK client for interacting with the Remnawave API.
This library simplifies working with the API by providing convenient controllers, Pydantic models for requests and responses, and fast serialization with orjson.
✨ Key Features
- Controller-based design: Split functionality into separate controllers for flexibility. Use only what you need!
- Pydantic models: Strongly-typed requests and responses for better reliability.
- Fast serialization: Powered by
orjsonfor efficient JSON handling. - Modular usage: Import individual controllers or the full SDK as needed.
📦 Installation
You can install it directly using pip:
pip install remnawave_api
If you need dev version:
pip install git+https://github.com/sm1ky/remnawave-api.git@development
🫥 Compatible versions
| Contract Version | Remnawave Panel Version |
|---|---|
| 1.1.3 | >=1.6.12 |
| 1.1.2 | >=1.6.3,<=1.6.11 |
| 1.1.1 | 1.6.1, 1.6.2 |
| 1.1.0 | 1.6.0 |
| 1.0.8 | 1.5.7 |
Dependencies
orjson(>=3.10.15, <4.0.0)rapid-api-client(==0.6.0)httpx(>=0.27.2, <0.28.0)
🚀 Usage
Here’s a quick example to get you started:
import os
import asyncio
from remnawave_api import RemnawaveSDK
from remnawave_api.models import UsersResponseDto, UserResponseDto
async def main():
# URL to your panel (ex. https://vpn.com or http://127.0.0.1:3000)
base_url: str = os.getenv("REMNAWAVE_BASE_URL")
# Bearer Token from panel (section: API Tokens)
token: str = os.getenv("REMNAWAVE_TOKEN")
# Initialize the SDK
remnawave = RemnawaveSDK(base_url=base_url, token=token)
# Fetch all users
response: UsersResponseDto = await remnawave.users.get_all_users_v2()
total_users: int = response.total
users: list[UserResponseDto] = response.users
print("Total users: ", total_users)
print("List of users: ", users)
# Disable a specific user
test_uuid: str = "e4d3f3d2-4f4f-4f4f-4f4f-4f4f4f4f4f4f"
disabled_user: UserResponseDto = await remnawave.users.disable_user(test_uuid)
print("Disabled user: ", disabled_user)
if __name__ == "__main__":
asyncio.run(main())
🧪 Running Tests
To run the test suite, use Poetry:
poetry run pytest
❤️ About
This SDK was originally developed by @kesevone for integration with Remnawave's API.
Maintained and extended by @sm1ky.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remnawave_api-1.1.3.tar.gz.
File metadata
- Download URL: remnawave_api-1.1.3.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
017985fe0804c7793c83a84f12d72cc42361dc782496206d399c5b1c1a89303e
|
|
| MD5 |
c1bbc26ae320df8aa31843a6c98d768c
|
|
| BLAKE2b-256 |
2d70191f52aefcbf0b491faa3d30d0a7814b99f60376970b0c70e549a4eb2ff1
|
Provenance
The following attestation bundles were made for remnawave_api-1.1.3.tar.gz:
Publisher:
upload.yml on sm1ky/remnawave-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remnawave_api-1.1.3.tar.gz -
Subject digest:
017985fe0804c7793c83a84f12d72cc42361dc782496206d399c5b1c1a89303e - Sigstore transparency entry: 245724719
- Sigstore integration time:
-
Permalink:
sm1ky/remnawave-api@d39f68a8a3dcd91cc12890fda353b50b6a32f5e3 -
Branch / Tag:
refs/heads/production - Owner: https://github.com/sm1ky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload.yml@d39f68a8a3dcd91cc12890fda353b50b6a32f5e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file remnawave_api-1.1.3-py3-none-any.whl.
File metadata
- Download URL: remnawave_api-1.1.3-py3-none-any.whl
- Upload date:
- Size: 40.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
975f54809b8f8066f13901b3ffb9a0d7e3fe1e237262ced6656382879528b89d
|
|
| MD5 |
c11106dd8f635a7690d95f14522dbd56
|
|
| BLAKE2b-256 |
793478aa085db60290b385b0ea3151a4da782402bbaa068f96704862c11f308f
|
Provenance
The following attestation bundles were made for remnawave_api-1.1.3-py3-none-any.whl:
Publisher:
upload.yml on sm1ky/remnawave-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remnawave_api-1.1.3-py3-none-any.whl -
Subject digest:
975f54809b8f8066f13901b3ffb9a0d7e3fe1e237262ced6656382879528b89d - Sigstore transparency entry: 245724720
- Sigstore integration time:
-
Permalink:
sm1ky/remnawave-api@d39f68a8a3dcd91cc12890fda353b50b6a32f5e3 -
Branch / Tag:
refs/heads/production - Owner: https://github.com/sm1ky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload.yml@d39f68a8a3dcd91cc12890fda353b50b6a32f5e3 -
Trigger Event:
push
-
Statement type: