Python-3xui 0.0.5__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_3xui-0.0.5 → python_3xui-0.0.6}/PKG-INFO +11 -13
- python_3xui-0.0.6/README.md +11 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/pyproject.toml +1 -1
- {python_3xui-0.0.5 → python_3xui-0.0.6}/python_3xui/api.py +3 -3
- python_3xui-0.0.5/README.md +0 -13
- {python_3xui-0.0.5 → python_3xui-0.0.6}/.gitignore +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/LICENSE +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/python_3xui/__init__.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/python_3xui/base_model.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/python_3xui/endpoints.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/python_3xui/models.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/python_3xui/util.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/conftest.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/gather_response_stubs.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/pytest.ini +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/test_endpoints_clients.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/test_endpoints_inbounds.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/test_non_idempotent_endpoints_clients.py +0 -0
- {python_3xui-0.0.5 → python_3xui-0.0.6}/tests/test_non_idempotent_endpoints_inbounds.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Python-3xui
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: 3x-ui wrapper for python
|
|
5
5
|
Project-URL: Homepage, https://github.com/Artem-Potapov/3x-py
|
|
6
6
|
Project-URL: Issues, https://github.com/Artem-Potapov/3x-py/issues
|
|
@@ -24,16 +24,14 @@ Requires-Dist: pytest-dependency; extra == 'testing'
|
|
|
24
24
|
Requires-Dist: requests; extra == 'testing'
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
|
|
27
|
-
<
|
|
28
|
-
<title>Readme</title>
|
|
29
|
-
<style>
|
|
30
|
-
.welcome {
|
|
31
|
-
color: rgb(1, 170, 170)
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
</head>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<h1 class="welcome">Hi! This is my example python 3x-ui wrapper!</h1>
|
|
27
|
+
<h1>Hi! This is my example python 3x-ui wrapper!</h1>
|
|
38
28
|
<p>I'm not expecting much to be honest, so please feel free to fork it if I abandon the project and you need it!</p>
|
|
39
|
-
<p>Also, if you REALLY want it I can give you the ownership if I step down, you can find my email in the pyproject.toml (I don't check it that much but trust me I do)</p>
|
|
29
|
+
<p>Also, if you REALLY want it I can give you the ownership if I step down, you can find my email in the pyproject.toml (I don't check it that much but trust me I do)</p>
|
|
30
|
+
|
|
31
|
+
<h2>0.0.6 Release Notes</h2>
|
|
32
|
+
<ul>
|
|
33
|
+
<li>Added RegEx support for prod_strings</li>
|
|
34
|
+
<li>Fix dependencies for pyOTP</li>
|
|
35
|
+
<li>Add One-time code support, as well as secrets</li>
|
|
36
|
+
Note that one-time codes only work one time... To ensure consistent logins you need OTP <b>secrets</b> to form new codes
|
|
37
|
+
</ul>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<h1>Hi! This is my example python 3x-ui wrapper!</h1>
|
|
2
|
+
<p>I'm not expecting much to be honest, so please feel free to fork it if I abandon the project and you need it!</p>
|
|
3
|
+
<p>Also, if you REALLY want it I can give you the ownership if I step down, you can find my email in the pyproject.toml (I don't check it that much but trust me I do)</p>
|
|
4
|
+
|
|
5
|
+
<h2>0.0.6 Release Notes</h2>
|
|
6
|
+
<ul>
|
|
7
|
+
<li>Added RegEx support for prod_strings</li>
|
|
8
|
+
<li>Fix dependencies for pyOTP</li>
|
|
9
|
+
<li>Add One-time code support, as well as secrets</li>
|
|
10
|
+
Note that one-time codes only work one time... To ensure consistent logins you need OTP <b>secrets</b> to form new codes
|
|
11
|
+
</ul>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import re
|
|
1
2
|
import time
|
|
2
3
|
from collections.abc import Sequence, Mapping
|
|
3
4
|
from typing import Self, Optional, Dict, Iterable, AsyncIterable, Type, Union, Any, List, Tuple, Literal
|
|
@@ -77,7 +78,7 @@ class XUIClient:
|
|
|
77
78
|
"""
|
|
78
79
|
from . import endpoints # look, I know it's bad, but we need to evade cyclical imports
|
|
79
80
|
self.connected: bool = False
|
|
80
|
-
self.PROD_STRING = custom_prod_string
|
|
81
|
+
self.PROD_STRING = re.compile(custom_prod_string)
|
|
81
82
|
self.session: AsyncClient | None = None
|
|
82
83
|
self.base_host: str = base_website
|
|
83
84
|
self.base_port: int = base_port
|
|
@@ -351,8 +352,7 @@ class XUIClient:
|
|
|
351
352
|
inbounds = await self.inbounds_end.get_all()
|
|
352
353
|
usable_inbounds: list[Inbound] = []
|
|
353
354
|
for inb in inbounds:
|
|
354
|
-
|
|
355
|
-
if self.PROD_STRING.lower() in inb.remark.lower():
|
|
355
|
+
if self.PROD_STRING.search(inb.remark):
|
|
356
356
|
usable_inbounds.append(inb)
|
|
357
357
|
if len(usable_inbounds) == 0:
|
|
358
358
|
raise RuntimeError("No production inbounds found! Change prod_string!")
|
python_3xui-0.0.5/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<head>
|
|
2
|
-
<title>Readme</title>
|
|
3
|
-
<style>
|
|
4
|
-
.welcome {
|
|
5
|
-
color: rgb(1, 170, 170)
|
|
6
|
-
}
|
|
7
|
-
</style>
|
|
8
|
-
</head>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<h1 class="welcome">Hi! This is my example python 3x-ui wrapper!</h1>
|
|
12
|
-
<p>I'm not expecting much to be honest, so please feel free to fork it if I abandon the project and you need it!</p>
|
|
13
|
-
<p>Also, if you REALLY want it I can give you the ownership if I step down, you can find my email in the pyproject.toml (I don't check it that much but trust me I do)</p>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|