Skip to main content

xtlsapi

codecov CI

Python library to communicate with xray core

Install it from PyPI

pip install xtlsapi

Usage

from xtlsapi import XrayClient, utils, exceptions

xray_client = XrayClient('1.2.3.4', 1234)
user_id = utils.generate_random_user_id()
user_email = utils.generate_random_email()
inbound_tag = 'inbound-tag'

# Get stats
print(utils.human_readable_bytes(xray_client.get_client_download_traffic('user-email@mail.com')))
print(utils.human_readable_bytes(xray_client.get_client_upload_traffic('user-email@mail.com')))
print(utils.human_readable_bytes(xray_client.get_inbound_download_traffic(inbound_tag)))
print(utils.human_readable_bytes(xray_client.get_inbound_upload_traffic(inbound_tag)))

# Add & Remove client
user = xray_client.add_client(inbound_tag, user_id, user_email)
if user:
    print(user)
    xray_client.remove_client(inbound_tag, user_email)

# restart logger
xray_client.restart_logger()

Development

Read the CONTRIBUTING.md file.

Metadata

Release files for xtlsapi-onlineiplist 3.3.1

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

Source distribution (sdist)

Source distribution for xtlsapi-onlineiplist 3.3.1
File Size Uploaded Provenance Actions
xtlsapi_onlineiplist-3.3.1.tar.gz 89.0 kB Without provenance Details for xtlsapi_onlineiplist-3.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xtlsapi-onlineiplist 3.3.1
File Interpreter ABI Platform Actions
xtlsapi_onlineiplist-3.3.1-py3-none-any.whl Python 3 none any Details for xtlsapi_onlineiplist-3.3.1-py3-none-any.whl

Total release size: 249.4 kB

Release files / xtlsapi_onlineiplist-3.3.1.tar.gz

Download URL xtlsapi_onlineiplist-3.3.1.tar.gz
Size 89.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a1ba172a7f8ea88196c4b8ae9ff5f6ac3fa3b8703ff57dd16d117df9fe2c20ab
BLAKE2b-256 checksum
How to use checksums
117d9f2de70c818d28597da251c35d29b8099ed564db3c938b07093b0c422a49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / xtlsapi_onlineiplist-3.3.1-py3-none-any.whl

Download URL xtlsapi_onlineiplist-3.3.1-py3-none-any.whl
Size 160.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce1b0f6b62b887e33f6d48f4ab752014cc64d6a6dcf4c8a5bf2ccdff733ddd1f
BLAKE2b-256 checksum
How to use checksums
2d433616653825ba175269283c5959d658e6a54d2d9a4f8078abc4b2af56ed7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for xtlsapi-onlineiplist 3.3.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.3.1 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