remnawave


Nameremnawave JSON
Version 2.1.1 PyPI version JSON
download
home_pageNone
SummaryA Python SDK for interacting with the Remnawave API v2.1.1.
upload_time2025-08-15 21:20:32
maintainerNone
docs_urlNone
authorArtem
requires_python<4.0,>=3.11
licenseMIT
keywords remnawave api sdk proxy httpx async xray
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Remnawave Python SDK

> **πŸ“’ Repository Migration Notice**
> 
> This repository has been moved from [`sm1ky/remnawave-api`](https://github.com/sm1ky/remnawave-api) to [`remnawave/python-sdk`](https://github.com/remnawave/python-sdk).
> 
> **PyPI Package Migration:**
> - **Legacy versions (≀1.x)**: Available at [`remnawave_api`](https://pypi.org/project/remnawave_api/) *(deprecated)*
> - **New versions (β‰₯2.x)**: Available at [`remnawave`](https://pypi.org/project/remnawave/)
> 
> Please update your dependencies to use the new package name for future updates.

[![Stars](https://img.shields.io/github/stars/remnawave/python-sdk.svg?style=social)](https://github.com/remnawave/python-sdk/stargazers)
[![Forks](https://img.shields.io/github/forks/remnawave/python-sdk.svg?style=social)](https://github.com/remnawave/python-sdk/network/members)
[![Issues](https://img.shields.io/github/issues/remnawave/python-sdk.svg)](https://github.com/remnawave/python-sdk/issues)
[![Supported python versions](https://img.shields.io/pypi/pyversions/remnawave.svg)](https://pypi.python.org/pypi/remnawave)
[![Downloads](https://img.shields.io/pypi/dm/remnawave.svg)](https://pypi.python.org/pypi/remnawave)
[![PyPi Package Version](https://img.shields.io/pypi/v/remnawave)](https://pypi.python.org/pypi/remnawave)
[![Publish Python Package](https://github.com/remnawave/python-sdk/actions/workflows/upload.yml/badge.svg?branch=production)](https://github.com/remnawave/python-sdk/actions/workflows/upload.yml)

A Python SDK client for interacting with the **[Remnawave API](https://remna.st)**.
This library simplifies working with the API by providing convenient controllers, Pydantic models for requests and responses, and fast serialization with `orjson`. 

**πŸŽ‰ Version 2.0.0** brings full compatibility with the latest Remnawave backend API, including new endpoints, improved response wrappers, and enhanced type safety.

## ✨ Key Features

- **Full v2.0.0 API compatibility**: Updated for latest Remnawave backend features
- **New controllers**: ConfigProfiles, InternalSquads, InfraBilling, NodesUsageHistory
- **Enhanced models**: OpenAPI-compliant response wrappers with improved field mappings
- **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 `orjson` for efficient JSON handling.
- **Modular usage**: Import individual controllers or the full SDK as needed.
- **Backward compatibility**: Legacy aliases maintained for smooth migration.

## πŸ“¦ Installation

### New Package (Recommended)
Install the latest version from the new PyPI package:

```bash
pip install remnawave
```

### Legacy Package (Deprecated)
If you need older versions (≀1.x), use the legacy package:

```bash
pip install remnawave_api  # Deprecated - use 'remnawave' instead
```

### Development Version
If you need the development version:

```bash
pip install git+https://github.com/remnawave/python-sdk.git@development
```

---

## πŸ«₯ Compatible versions

| Contract Version | Remnawave Panel Version |
| ---------------- | ----------------------- |
| 2.1.1.           | >=2.1.1                 |
| 2.0.0            | >=2.0.0,<2.1.0          |
| 1.1.3            | >=1.6.12,<2.0.0         |
| 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:

```python
import os
import asyncio

from remnawave import RemnawaveSDK  # Updated import for new package
from remnawave.models import (  # Updated import path
    UsersResponseDto, 
    UserResponseDto,
    GetAllConfigProfilesResponseDto,
    CreateInternalSquadRequestDto
)

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)

if __name__ == "__main__":
    asyncio.run(main())
```

---

## πŸ§ͺ Running Tests

To run the test suite, use Poetry:

```bash
poetry run pytest
```

## ❀️ About

This SDK was originally developed by [@kesevone](https://github.com/kesevone) for integration with Remnawave's API.

Previously maintained by [@sm1ky](https://github.com/sm1ky) at [`sm1ky/remnawave-api`](https://github.com/sm1ky/remnawave-api).

Now officially maintained by the Remnawave Community at [`remnawave/python-sdk`](https://github.com/remnawave/python-sdk).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "remnawave",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "remnawave, api, sdk, proxy, httpx, async, xray",
    "author": "Artem",
    "author_email": "dev@forestsnet.com",
    "download_url": "https://files.pythonhosted.org/packages/8b/63/45d9a499112098a3b2fa668a0724f5090b3f3ed9369bff0c8fcee2d74914/remnawave-2.1.1.tar.gz",
    "platform": null,
    "description": "# Remnawave Python SDK\n\n> **\ud83d\udce2 Repository Migration Notice**\n> \n> This repository has been moved from [`sm1ky/remnawave-api`](https://github.com/sm1ky/remnawave-api) to [`remnawave/python-sdk`](https://github.com/remnawave/python-sdk).\n> \n> **PyPI Package Migration:**\n> - **Legacy versions (\u22641.x)**: Available at [`remnawave_api`](https://pypi.org/project/remnawave_api/) *(deprecated)*\n> - **New versions (\u22652.x)**: Available at [`remnawave`](https://pypi.org/project/remnawave/)\n> \n> Please update your dependencies to use the new package name for future updates.\n\n[![Stars](https://img.shields.io/github/stars/remnawave/python-sdk.svg?style=social)](https://github.com/remnawave/python-sdk/stargazers)\n[![Forks](https://img.shields.io/github/forks/remnawave/python-sdk.svg?style=social)](https://github.com/remnawave/python-sdk/network/members)\n[![Issues](https://img.shields.io/github/issues/remnawave/python-sdk.svg)](https://github.com/remnawave/python-sdk/issues)\n[![Supported python versions](https://img.shields.io/pypi/pyversions/remnawave.svg)](https://pypi.python.org/pypi/remnawave)\n[![Downloads](https://img.shields.io/pypi/dm/remnawave.svg)](https://pypi.python.org/pypi/remnawave)\n[![PyPi Package Version](https://img.shields.io/pypi/v/remnawave)](https://pypi.python.org/pypi/remnawave)\n[![Publish Python Package](https://github.com/remnawave/python-sdk/actions/workflows/upload.yml/badge.svg?branch=production)](https://github.com/remnawave/python-sdk/actions/workflows/upload.yml)\n\nA Python SDK client for interacting with the **[Remnawave API](https://remna.st)**.\nThis library simplifies working with the API by providing convenient controllers, Pydantic models for requests and responses, and fast serialization with `orjson`. \n\n**\ud83c\udf89 Version 2.0.0** brings full compatibility with the latest Remnawave backend API, including new endpoints, improved response wrappers, and enhanced type safety.\n\n## \u2728 Key Features\n\n- **Full v2.0.0 API compatibility**: Updated for latest Remnawave backend features\n- **New controllers**: ConfigProfiles, InternalSquads, InfraBilling, NodesUsageHistory\n- **Enhanced models**: OpenAPI-compliant response wrappers with improved field mappings\n- **Controller-based design**: Split functionality into separate controllers for flexibility. Use only what you need!\n- **Pydantic models**: Strongly-typed requests and responses for better reliability.\n- **Fast serialization**: Powered by `orjson` for efficient JSON handling.\n- **Modular usage**: Import individual controllers or the full SDK as needed.\n- **Backward compatibility**: Legacy aliases maintained for smooth migration.\n\n## \ud83d\udce6 Installation\n\n### New Package (Recommended)\nInstall the latest version from the new PyPI package:\n\n```bash\npip install remnawave\n```\n\n### Legacy Package (Deprecated)\nIf you need older versions (\u22641.x), use the legacy package:\n\n```bash\npip install remnawave_api  # Deprecated - use 'remnawave' instead\n```\n\n### Development Version\nIf you need the development version:\n\n```bash\npip install git+https://github.com/remnawave/python-sdk.git@development\n```\n\n---\n\n## \ud83e\udee5 Compatible versions\n\n| Contract Version | Remnawave Panel Version |\n| ---------------- | ----------------------- |\n| 2.1.1.           | >=2.1.1                 |\n| 2.0.0            | >=2.0.0,<2.1.0          |\n| 1.1.3            | >=1.6.12,<2.0.0         |\n| 1.1.2            | >=1.6.3,<=1.6.11        |\n| 1.1.1            | 1.6.1, 1.6.2            |\n| 1.1.0            | 1.6.0                   |\n| 1.0.8            | 1.5.7                   |\n\n### Dependencies\n- `orjson` (>=3.10.15, <4.0.0)\n- `rapid-api-client` (==0.6.0)\n- `httpx` (>=0.27.2, <0.28.0)\n\n## \ud83d\ude80 Usage\n\nHere\u2019s a quick example to get you started:\n\n```python\nimport os\nimport asyncio\n\nfrom remnawave import RemnawaveSDK  # Updated import for new package\nfrom remnawave.models import (  # Updated import path\n    UsersResponseDto, \n    UserResponseDto,\n    GetAllConfigProfilesResponseDto,\n    CreateInternalSquadRequestDto\n)\n\nasync def main():\n    # URL to your panel (ex. https://vpn.com or http://127.0.0.1:3000)\n    base_url: str = os.getenv(\"REMNAWAVE_BASE_URL\")\n    # Bearer Token from panel (section: API Tokens) \n    token: str = os.getenv(\"REMNAWAVE_TOKEN\")\n\n    # Initialize the SDK\n    remnawave = RemnawaveSDK(base_url=base_url, token=token)\n\n    # Fetch all users\n    response: UsersResponseDto = await remnawave.users.get_all_users_v2()\n    total_users: int = response.total\n    users: list[UserResponseDto] = response.users\n    print(\"Total users: \", total_users)\n    print(\"List of users: \", users)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n---\n\n## \ud83e\uddea Running Tests\n\nTo run the test suite, use Poetry:\n\n```bash\npoetry run pytest\n```\n\n## \u2764\ufe0f About\n\nThis SDK was originally developed by [@kesevone](https://github.com/kesevone) for integration with Remnawave's API.\n\nPreviously maintained by [@sm1ky](https://github.com/sm1ky) at [`sm1ky/remnawave-api`](https://github.com/sm1ky/remnawave-api).\n\nNow officially maintained by the Remnawave Community at [`remnawave/python-sdk`](https://github.com/remnawave/python-sdk).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python SDK for interacting with the Remnawave API v2.1.1.",
    "version": "2.1.1",
    "project_urls": {
        "Community Chat": "https://t.me/+xQs17zMzwCY1NzYy",
        "Homepage": "https://github.com/remnawave/python-sdk",
        "Panel Page": "https://remna.st/",
        "Update Channel": "https://t.me/remnawave"
    },
    "split_keywords": [
        "remnawave",
        " api",
        " sdk",
        " proxy",
        " httpx",
        " async",
        " xray"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "62b6d45ddf967c0e97405423305dc8c56bb8ef453a577149bc337e2405204ee8",
                "md5": "c204fd22a5ceabff6fe9f6238360582a",
                "sha256": "5de2ec47201952d1d9fd2cfff07751bcde3a75b9f0d0e5e4ef0e601a82a5a9fb"
            },
            "downloads": -1,
            "filename": "remnawave-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c204fd22a5ceabff6fe9f6238360582a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 50474,
            "upload_time": "2025-08-15T21:20:31",
            "upload_time_iso_8601": "2025-08-15T21:20:31.355320Z",
            "url": "https://files.pythonhosted.org/packages/62/b6/d45ddf967c0e97405423305dc8c56bb8ef453a577149bc337e2405204ee8/remnawave-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8b6345d9a499112098a3b2fa668a0724f5090b3f3ed9369bff0c8fcee2d74914",
                "md5": "e9aad5bc516ec717cd1f906f63445bd2",
                "sha256": "ec91c22736f93e2911205145b9e27f09f7b5ab64b312505f5b25cd434cd9ffcb"
            },
            "downloads": -1,
            "filename": "remnawave-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e9aad5bc516ec717cd1f906f63445bd2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 29910,
            "upload_time": "2025-08-15T21:20:32",
            "upload_time_iso_8601": "2025-08-15T21:20:32.827549Z",
            "url": "https://files.pythonhosted.org/packages/8b/63/45d9a499112098a3b2fa668a0724f5090b3f3ed9369bff0c8fcee2d74914/remnawave-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-15 21:20:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "remnawave",
    "github_project": "python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "remnawave"
}
        
Elapsed time: 0.86809s