Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: bugs

asyncapixui

Asynchronous api module for 3x-ui

Simple usage

import asyncio
from datetime import datetime, timedelta
from logging import DEBUG, getLogger, basicConfig
from uuid import uuid4

from asycnapixui.api import Api
from asycnapixui.models import Client
from asycnapixui.utils import ExpiryTime


async def main():
    async with Api(url="https://example.com:port/path/",
                   login="admin", password="admin", token="") as api:
        """
        create api session
        """

        clients = []
        emails = ['Petya', 'Vasya', 'Egor']

        """get inbound by id"""
        inbound = await api.get_inbound(1)

        """create clients list"""
        for email in emails:
            key = str(uuid4())
            clients.append(Client(id=key, email=email, subId=key))

        """add clients to inbound """
        await api.post_add_client_inbound(clients, inbound.id)

        """
        enable clients in inbound 
        and add date to end = now + 10 days
        """
        for client in clients:
            client.enable = True
            client.expiryTime = ExpiryTime(date=datetime.now() + timedelta(days=10)).expiryTime
            await api.post_update_client(client, inbound.id, client.id)


"""
logs with information about responses
"""

logger = getLogger()
FORMAT = '%(asctime)s : %(levelname)s:%(name)s : %(funcName)s:%(message)s'
basicConfig(level=DEBUG, format=FORMAT)

if __name__ == "__main__":
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
    asyncio.run(main())

Metadata

Release files for asycnapixui 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asycnapixui 0.0.3
File Size Uploaded Provenance
asycnapixui-0.0.3.tar.gz 12.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asycnapixui 0.0.3
File Interpreter ABI Platform
asycnapixui-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 18.2 kB

Release files / asycnapixui-0.0.3.tar.gz

Download URL asycnapixui-0.0.3.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
881da4c79b5651c233acd12717c6011c79676b267001097134cc11263b82c40e
BLAKE2b-256 checksum
How to use checksums
ec5c480051e76e2e4bf958b496c58d8625410d6da171fe26be3e407fc46fbc7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.4

Release files / asycnapixui-0.0.3-py3-none-any.whl

Download URL asycnapixui-0.0.3-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d603762ca31732a9ba9ebdbc3392fabf40b4d4aa4a11e5547be4ae0067c278b3
BLAKE2b-256 checksum
How to use checksums
84836d1e2f8f7ca615f9d60202e8b7f8b3a14e04ce093625533f71d965aaa686
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.4

Security for asycnapixui 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

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