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
Release history Release notifications | RSS feed
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.1.tar.gz
(9.8 kB
view details)
File details
Details for the file sui_async-1.0.1.tar.gz.
File metadata
- Download URL: sui_async-1.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d874427376c73760205b1d6bcae781c8e373a5103916e9ca70e1c74d67d80325
|
|
| MD5 |
1e9cece7ea3d526e05ec129ccbab8262
|
|
| BLAKE2b-256 |
b10846c667c756865317ee5969169722ae1a337bd5e7700a6b4783fcdddd9f14
|