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
pip install aioxui
git clone https://github.com/DevJavad/aioxui.git
cd aioxui
pip install -e .
Quick Start
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
import asyncio
import os
from aioxui import XUI
from aioxui.models import Client
from aioxui.enums import UnitType
from aioxui.utils import DateTime, Storage
from dotenv import load_dotenv
load_dotenv()
url: str = os.getenv("URL")
token: str = os.getenv("TOKEN")
async def main():
async with XUI(base_url=url, token=token) as xui:
client = Client(
totalGB=Storage.from_unit(10, UnitType.GB),
expiryTime=DateTime.after(days=30),
limitIp=3,
tgId=12345678, # Telegram user_id
)
add = await xui.client.add(inbound_id=[2, 3], client=client)
print(add.email)
print(add.sub_id)
asyncio.run(main())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioxui-0.0.4.tar.gz
(7.9 kB
view details)
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 aioxui-0.0.4.tar.gz.
File metadata
- Download URL: aioxui-0.0.4.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
190615473059e35f9572ec548641138febfc315a198bff54a4c3177f9250097c
|
|
| MD5 |
4faf5871ec51c10b085e0cbf92968033
|
|
| BLAKE2b-256 |
a90d1ec7d75206f5d48458736791e4288aa9faf11b9c99536985d706cadd7944
|
File details
Details for the file aioxui-0.0.4-py3-none-any.whl.
File metadata
- Download URL: aioxui-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ad8557b87352c38b154a55e02eb002758ee89242bc30a69096f5f970d0e34f
|
|
| MD5 |
32c3fde2591fedf9e3d7ccfec5adae97
|
|
| BLAKE2b-256 |
4536666b5eb07cf2dbc286542cdc60bbc7afd7f2af3cc762555645c4fbc41fe9
|