Skip to main content

An application with python that allows you to modify your s-ui panel

Project description

PyXUI Async

An application with python that allows you to modify your s-ui panel (alireza0 s-ui)

How To Install

pip install sui_async
from sui_async import Sui

sui = Sui(
    full_address="http://staliox.site:2087",
    token_api="TOKEN",
    https=False, # Make note if you don't use https set False else set True
    timeout=10  # timeout connect
)
  • Get inbounds list
get_inbounds = await sui.get_inbounds()
  • Add client to the existing inbound
result = await sui.add_client(
    name="test-client",
    password="SecurePass1234",
    inbounds_id=[1,3],
    description="Test client",
    volume=10737418240,
    expiry=1735689600
)
  • Get client's information:
get_client = await sui.get_client_by_name(name='name')

# Result
class ClientItem(BaseModel):
    id: int
    name: str
    enable: bool
    inbounds: List[int]
    desc: Optional[str] = ""
    group: Optional[str] = ""
    up: Optional[int] = 0
    down: Optional[int] = 0
    volume: Optional[int] = 0
    expiry: Optional[int] = 0
    config: Optional[ClientConfig] = None
    links: Optional[List[ClientLink]] = None
  • Delete client from the existing inbound:
get_client = await sui.delete_client_by_name(name='name')
  • Update the existing client
result = await sui.update_client(
    user_id=0,
    enable=False,
    desc='desc',
    group='group',
    up=0,
    down=0,
    volume=0,
    expiry=0,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sui_async-1.0.0.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file sui_async-1.0.0.tar.gz.

File metadata

  • Download URL: sui_async-1.0.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for sui_async-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8601ea8666fe82163a4ad7323414dd45ee5d5a7abbd44704fb2aa942a378c800
MD5 5ed8cef7a1ca52aefade91268c9d704c
BLAKE2b-256 aaf8b3c91be84f5d921ef1ae6099447fb14c474a9ce46e277877a5f5979485a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page