{"id":19503505,"url":"https://github.com/hiddify/xtlsapi","last_synced_at":"2025-07-12T07:03:00.609Z","repository":{"id":65388534,"uuid":"588680766","full_name":"hiddify/xtlsapi","owner":"hiddify","description":"Python library to communicate with xray core ","archived":false,"fork":false,"pushed_at":"2024-11-16T19:15:31.000Z","size":3049,"stargazers_count":60,"open_issues_count":3,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-18T19:17:27.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hiddify.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":"hiddify","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://etherscan.io/address/0xF15ec158318d7F5236d82d040102340B0974C3E0","https://btcscan.org/address/3Epy7jyUUCVb1w12MNTu2JFVVhmfpr4EGX","https://www.blockonomics.co/invoice/43602/#/?key=ZxOuyJCN","https://invoice.build/invoices/e6781a80-bd8a-489e-af1e-d6368fc5bdca"],"bitcoin":"3Epy7jyUUCVb1w12MNTu2JFVVhmfpr4EGX","ethereum":1377979888499107190715896424743981346969345115104}},"created_at":"2023-01-13T18:11:42.000Z","updated_at":"2025-05-26T11:35:52.000Z","dependencies_parsed_at":"2024-06-21T14:14:35.530Z","dependency_job_id":"e92db574-ef1b-4e36-94e0-ab70af035179","html_url":"https://github.com/hiddify/xtlsapi","commit_stats":{"total_commits":50,"total_committers":5,"mean_commits":10.0,"dds":0.24,"last_synced_commit":"df36926534ad559ef0468de03253622717f6f8c3"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":"rochacbruno/python-project-template","purl":"pkg:github/hiddify/xtlsapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiddify%2Fxtlsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiddify%2Fxtlsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiddify%2Fxtlsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiddify%2Fxtlsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiddify","download_url":"https://codeload.github.com/hiddify/xtlsapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiddify%2Fxtlsapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264952001,"owners_count":23687994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T22:21:54.665Z","updated_at":"2025-07-12T07:03:00.591Z","avatar_url":"https://github.com/hiddify.png","language":"Python","funding_links":["https://opencollective.com/hiddify","https://etherscan.io/address/0xF15ec158318d7F5236d82d040102340B0974C3E0","https://btcscan.org/address/3Epy7jyUUCVb1w12MNTu2JFVVhmfpr4EGX","https://www.blockonomics.co/invoice/43602/#/?key=ZxOuyJCN","https://invoice.build/invoices/e6781a80-bd8a-489e-af1e-d6368fc5bdca","3Epy7jyUUCVb1w12MNTu2JFVVhmfpr4EGX",1377979888499107190715896424743981346969345115104],"categories":[],"sub_categories":[],"readme":"\n# xtlsapi\n\n[![codecov](https://codecov.io/gh/hiddify/xtlsapi/branch/main/graph/badge.svg?token=xtlsapi_token_here)](https://codecov.io/gh/hiddify/xtlsapi)\n[![CI](https://github.com/hiddify/xtlsapi/actions/workflows/main.yml/badge.svg)](https://github.com/hiddify/xtlsapi/actions/workflows/main.yml)\n\n\nPython library to communicate with xray core\n\n## Install it from PyPI\n\n```bash\npip install xtlsapi\n```\n\n## Usage\n\n```py\nfrom xtlsapi import XrayClient, utils, exceptions\n\nxray_client = XrayClient('1.2.3.4', 1234)\nuser_id = utils.generate_random_user_id()\nuser_email = utils.generate_random_email()\ninbound_tag = 'inbound-tag'\n\n# Get stats\nprint(utils.human_readable_bytes(xray_client.get_client_download_traffic('user-email@mail.com')))\nprint(utils.human_readable_bytes(xray_client.get_client_upload_traffic('user-email@mail.com')))\nprint(utils.human_readable_bytes(xray_client.get_inbound_download_traffic(inbound_tag)))\nprint(utils.human_readable_bytes(xray_client.get_inbound_upload_traffic(inbound_tag)))\n\n# Add \u0026 Remove client\nuser = xray_client.add_client(inbound_tag, user_id, user_email)\nif user:\n    print(user)\n    xray_client.remove_client(inbound_tag, user_email)\n\n# restart logger\nxray_client.restart_logger()\n```\n\n## Development\n\nRead the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiddify%2Fxtlsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiddify%2Fxtlsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiddify%2Fxtlsapi/lists"}