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-ipblacklist 3.4.4

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-ipblacklist 3.4.4
File Size Uploaded
xtlsapi_ipblacklist-3.4.4.tar.gz 57.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xtlsapi-ipblacklist 3.4.4
File Interpreter ABI Platform
xtlsapi_ipblacklist-3.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 237.5 kB

Release files / xtlsapi_ipblacklist-3.4.4.tar.gz

Download URL xtlsapi_ipblacklist-3.4.4.tar.gz
Size 57.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1d106d99a19d586c5c55c3eb31e5faada15c0b88cb2c600a937d4823ea913e0a
BLAKE2b-256 checksum
How to use checksums
9b4518d93ebe8df9214046720ff8fbe5b13645860a021c0a6138de69efddc822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / xtlsapi_ipblacklist-3.4.4-py3-none-any.whl

Download URL xtlsapi_ipblacklist-3.4.4-py3-none-any.whl
Size 179.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e58198998a01f2892bfe68d5bb6736046d13974557d239092123ce6b0361ade5
BLAKE2b-256 checksum
How to use checksums
bf51877b288dc5e62d68d9bedd653fbd0235d05b6e420f1820b7c76c10b3a60b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

3.4.4 This release

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.9

2 release files

3.3.8

2 release files

3.3.7

2 release files

3.3.6

2 release files

3.3.5

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.2

2 release files

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