remnawave


Nameremnawave JSON
Version 2.1.13 PyPI version JSON
download
home_pageNone
SummaryA Python SDK for interacting with the Remnawave API v2.1.13.
upload_time2025-09-16 19:52:12
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.13           | >=2.1.13                |
| 2.1.9            | >=2.1.9, <=2.1.12       |
| 2.1.8            | ==2.1.8                 |
| 2.1.7.post1      | ==2.1.7                 |
| 2.1.4            | >=2.1.4, <2.1.7         |
| 2.1.1            | >=2.1.1, <2.1.4         |
| 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/ed/43/68d6f7d08f2e9626f230ed4a9d1edb1c5c850677b6064649bb82b10acbc9/remnawave-2.1.13.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.13           | >=2.1.13                |\n| 2.1.9            | >=2.1.9, <=2.1.12       |\n| 2.1.8            | ==2.1.8                 |\n| 2.1.7.post1      | ==2.1.7                 |\n| 2.1.4            | >=2.1.4, <2.1.7         |\n| 2.1.1            | >=2.1.1, <2.1.4         |\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.13.",
    "version": "2.1.13",
    "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": "5925b48ffe5c74f2bca5093d2b00f382bf95ed327f2c0bca269034d34a02e361",
                "md5": "b4cdf448983d70e6d88109fe37e85084",
                "sha256": "2bbdc3df76f50e34248b197d74a480c57b0e2d72bb67ff577c508d558e531078"
            },
            "downloads": -1,
            "filename": "remnawave-2.1.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b4cdf448983d70e6d88109fe37e85084",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 53275,
            "upload_time": "2025-09-16T19:52:11",
            "upload_time_iso_8601": "2025-09-16T19:52:11.283766Z",
            "url": "https://files.pythonhosted.org/packages/59/25/b48ffe5c74f2bca5093d2b00f382bf95ed327f2c0bca269034d34a02e361/remnawave-2.1.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ed4368d6f7d08f2e9626f230ed4a9d1edb1c5c850677b6064649bb82b10acbc9",
                "md5": "e1a731881ee34bb6bda255e4bf0586e0",
                "sha256": "1e94f94f9381ec8bcbcbf3b443b40b91b03fd8758e75268d1cccf4b9e270a82e"
            },
            "downloads": -1,
            "filename": "remnawave-2.1.13.tar.gz",
            "has_sig": false,
            "md5_digest": "e1a731881ee34bb6bda255e4bf0586e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 31844,
            "upload_time": "2025-09-16T19:52:12",
            "upload_time_iso_8601": "2025-09-16T19:52:12.692594Z",
            "url": "https://files.pythonhosted.org/packages/ed/43/68d6f7d08f2e9626f230ed4a9d1edb1c5c850677b6064649bb82b10acbc9/remnawave-2.1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-16 19:52:12",
    "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.88404s