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/your-repo/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.3.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.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file aioxui-0.0.3.tar.gz.

File metadata

  • Download URL: aioxui-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c673783c9c4b7378428a6d8908eb63eb39f5834d6bace47ad61ba67e678230f9
MD5 ba654cab6c9adbe7d63e7678d3b098e4
BLAKE2b-256 081ceb5b4ce79e3cc183f3c4b768714804859fa713e1a7a6b64ff8a4cc3c541a

See more details on using hashes here.

File details

Details for the file aioxui-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: aioxui-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 436f69e672dc5e908f0605c006bfa835fb1d759b5e1114380af3caae3d47e764
MD5 550792f8908f11c82055be9bc864da7f
BLAKE2b-256 8c01b1ad8ba547a815b05f34b488bfc0332ddeb8820ac933e0b0dc998b9389b7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.4

2 files

This release

0.0.3 This release

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