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.2.tar.gz (9.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sui_async-1.0.2.tar.gz
  • Upload date:
  • Size: 9.9 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.2.tar.gz
Algorithm Hash digest
SHA256 dfe14ca3586536a1c78056403fdf1d2c5778494a335ac3088f0d481e47e5ed04
MD5 87a02b7a9558877721947e3a8b6de9c0
BLAKE2b-256 73c172aac2df4c7413f376528e4014683f97e2edd71ac7765f5936d528432fba

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