Metadata-Version: 2.4
Name: aioxui
Version: 0.0.2
Summary: Async Python SDK for XUI panel API
Author: Javad
License: MIT
Project-URL: Homepage, https://github.com/DevJavad/aioxui
Project-URL: Repository, https://github.com/DevJavad/aioxui
Keywords: xui,vpn,api,async,sdk
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9
Requires-Dist: pydantic>=2.0
Dynamic: license-file

# AioxUI

A lightweight async Python SDK for interacting with XUI panel APIs.

## Features
- Async client based on aiohttp
- Typed models using Pydantic
- Client management (create, update, delete)
- Traffic management utilities
- Inbound attach/detach support

## Installation

```bash
pip install aioxui
```

```bash
git clone https://github.com/your-repo/aioxui.git
cd aioxui
pip install -e .
```

## Quick Start
```python
import asyncio

from aioxui import XUI

async def main():
    async with XUI(
        base_url="https://your-panel.com/",
        token="YOUR_TOKEN"
    ) as xui:

        client = await xui.client.get("Javad")
        print(client)

        clients = await xui.client.all()
        print(len(clients))

asyncio.run(main())
```

## Example: Create Client
```python
import asyncio

from aioxui import XUI
from aioxui.models import Client
from aioxui.utils import GB, Timestamp


async def main():
    async with XUI(
        base_url="https://your-panel.com/",
        token="YOUR_TOKEN",
    ) as xui:

        client = Client(
            totalGB=GB.of(10),
            expiryTime=Timestamp.from_days(30),
            limitIp=3,
        )

        add = await xui.client.add(inbound_id=[2, 3], client=client)
        print(add.email)
        print(add.sub_id)


asyncio.run(main())
```
