Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aioxui-0.0.4-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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

Hashes for aioxui-0.0.4.tar.gz
Algorithm Hash digest
SHA256 190615473059e35f9572ec548641138febfc315a198bff54a4c3177f9250097c
MD5 4faf5871ec51c10b085e0cbf92968033
BLAKE2b-256 a90d1ec7d75206f5d48458736791e4288aa9faf11b9c99536985d706cadd7944

See more details on using hashes here.

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

Hashes for aioxui-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ad8557b87352c38b154a55e02eb002758ee89242bc30a69096f5f970d0e34f
MD5 32c3fde2591fedf9e3d7ccfec5adae97
BLAKE2b-256 4536666b5eb07cf2dbc286542cdc60bbc7afd7f2af3cc762555645c4fbc41fe9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page