xn-auth 0.2.28__py3-none-any.whl → 0.2.29.dev1__py3-none-any.whl
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.
- x_auth/models.py +2 -2
- x_auth/types.py +7 -21
- {xn_auth-0.2.28.dist-info → xn_auth-0.2.29.dev1.dist-info}/METADATA +2 -1
- xn_auth-0.2.29.dev1.dist-info/RECORD +10 -0
- {xn_auth-0.2.28.dist-info → xn_auth-0.2.29.dev1.dist-info}/WHEEL +1 -1
- xn_auth-0.2.28.dist-info/RECORD +0 -10
- {xn_auth-0.2.28.dist-info → xn_auth-0.2.29.dev1.dist-info}/top_level.txt +0 -0
x_auth/models.py
CHANGED
|
@@ -84,7 +84,7 @@ class Proxy(Model, TsTrait):
|
|
|
84
84
|
port: str = IntField()
|
|
85
85
|
username: str = CharField(63)
|
|
86
86
|
password: str = CharField(63)
|
|
87
|
-
|
|
87
|
+
valid: bool = BooleanField(null=True)
|
|
88
88
|
country: ForeignKeyRelation[Country] = ForeignKeyField("models.Country", "proxies", null=True) # todo rm nullable
|
|
89
89
|
|
|
90
90
|
class Meta:
|
|
@@ -134,7 +134,7 @@ class Proxy(Model, TsTrait):
|
|
|
134
134
|
await cls.create(**df, host=r.proxy_address, port=r.port, id=r.id)
|
|
135
135
|
|
|
136
136
|
@staticmethod
|
|
137
|
-
async def
|
|
137
|
+
async def get_replaced(wst: str):
|
|
138
138
|
async with ClientSession("https://proxy.webshare.io/api/v2/") as s:
|
|
139
139
|
resp = await s.get("proxy/list/replaced/", headers={"Authorization": f"Token {wst}"})
|
|
140
140
|
lst = (await resp.json())["results"]
|
x_auth/types.py
CHANGED
|
@@ -25,27 +25,13 @@ class Proxy(Struct):
|
|
|
25
25
|
created_at: datetime
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
class ToReplace(Struct):
|
|
29
|
-
type: Literal["ip_range",]
|
|
30
|
-
ip_ranges: list[str]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class ReplaceWith(Struct):
|
|
34
|
-
type: Literal["country",]
|
|
35
|
-
country_code: str
|
|
36
|
-
|
|
37
|
-
|
|
38
28
|
class Replacement(Struct):
|
|
39
29
|
id: int
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
reason: Literal["auto_invalidated", "auto_out_of_rotation"]
|
|
31
|
+
replaced_with: str
|
|
32
|
+
replaced_with_port: int
|
|
33
|
+
replaced_with_country_code: str
|
|
34
|
+
proxy: str
|
|
35
|
+
proxy_port: int
|
|
36
|
+
proxy_country_code: str
|
|
47
37
|
created_at: datetime
|
|
48
|
-
error: str = None
|
|
49
|
-
error_code: str = None
|
|
50
|
-
dry_run_completed_at: datetime = None
|
|
51
|
-
completed_at: datetime = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xn-auth
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.29.dev1
|
|
4
4
|
Summary: Auth adapter for XN-Api framework
|
|
5
5
|
Author-email: Artemiev <mixartemev@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -9,6 +9,7 @@ Project-URL: Repository, https://github.com/XyncNet/x-auth
|
|
|
9
9
|
Keywords: litestar,jwt,auth
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: aiogram
|
|
12
13
|
Requires-Dist: msgspec
|
|
13
14
|
Requires-Dist: pyjwt
|
|
14
15
|
Requires-Dist: xn-model
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
x_auth/controller.py,sha256=0Z9kogEQ3tgXiO9Wv06dzb7RtWfIuybjqqAJoQ46j5I,2246
|
|
2
|
+
x_auth/enums.py,sha256=kmkX-j1bWNpel6_-fw2YtMEmJSAj9w2iizkG03s3ZSU,631
|
|
3
|
+
x_auth/exceptions.py,sha256=2B4okJxhPyNqTJXlSTfblJUQJ60bLGXdgJIu6ue7S6w,162
|
|
4
|
+
x_auth/middleware.py,sha256=JfssQomDv0J_69GfS2a_2_uyRzs26zSY6IW1Vk7m8K0,2900
|
|
5
|
+
x_auth/models.py,sha256=5mfvjbARdRFeDq_XIUmQxyFKoK8jQI6CrO1Fbp6glT0,6684
|
|
6
|
+
x_auth/types.py,sha256=j3WGcyH24DmFEdTT6U7xzb_fEm1tFcBZsANKMy7bydo,689
|
|
7
|
+
xn_auth-0.2.29.dev1.dist-info/METADATA,sha256=vkBOI_MFfz8UYe9alir17Ugg2ZKAL2yHgtY_onbIElI,804
|
|
8
|
+
xn_auth-0.2.29.dev1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
9
|
+
xn_auth-0.2.29.dev1.dist-info/top_level.txt,sha256=ydMDkzxgQPtW-E_MNDfUAroAFZvWSqU-x_kZSA7NSFo,7
|
|
10
|
+
xn_auth-0.2.29.dev1.dist-info/RECORD,,
|
xn_auth-0.2.28.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
x_auth/controller.py,sha256=0Z9kogEQ3tgXiO9Wv06dzb7RtWfIuybjqqAJoQ46j5I,2246
|
|
2
|
-
x_auth/enums.py,sha256=kmkX-j1bWNpel6_-fw2YtMEmJSAj9w2iizkG03s3ZSU,631
|
|
3
|
-
x_auth/exceptions.py,sha256=2B4okJxhPyNqTJXlSTfblJUQJ60bLGXdgJIu6ue7S6w,162
|
|
4
|
-
x_auth/middleware.py,sha256=JfssQomDv0J_69GfS2a_2_uyRzs26zSY6IW1Vk7m8K0,2900
|
|
5
|
-
x_auth/models.py,sha256=zJ9aquGluI3u3p4Uqx3X-Eg1F3_Ai_nnFPnh-z14T2U,6682
|
|
6
|
-
x_auth/types.py,sha256=M_j6HeqcMnxGrpzWPtzZY9XcA_GlGyb8f9jRyPIh6V8,923
|
|
7
|
-
xn_auth-0.2.28.dist-info/METADATA,sha256=5U4ZoDx-2iv3R2OTRU6fcuEb4iZF2eVAzx8IzcjPZV4,776
|
|
8
|
-
xn_auth-0.2.28.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
9
|
-
xn_auth-0.2.28.dist-info/top_level.txt,sha256=ydMDkzxgQPtW-E_MNDfUAroAFZvWSqU-x_kZSA7NSFo,7
|
|
10
|
-
xn_auth-0.2.28.dist-info/RECORD,,
|
|
File without changes
|