Ryzenth 1.8.4__py3-none-any.whl → 1.8.6__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.
- Ryzenth/__init__.py +1 -1
- Ryzenth/__version__.py +1 -1
- Ryzenth/_asynchisded.py +20 -5
- Ryzenth/_synchisded.py +20 -5
- Ryzenth/ryzenth_client.py +9 -1
- Ryzenth/types/__init__.py +4 -2
- {ryzenth-1.8.4.dist-info → ryzenth-1.8.6.dist-info}/METADATA +4 -4
- ryzenth-1.8.6.dist-info/RECORD +11 -0
- ryzenth-1.8.4.dist-info/RECORD +0 -11
- {ryzenth-1.8.4.dist-info → ryzenth-1.8.6.dist-info}/WHEEL +0 -0
- {ryzenth-1.8.4.dist-info → ryzenth-1.8.6.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.8.4.dist-info → ryzenth-1.8.6.dist-info}/top_level.txt +0 -0
Ryzenth/__init__.py
CHANGED
Ryzenth/__version__.py
CHANGED
Ryzenth/_asynchisded.py
CHANGED
@@ -20,8 +20,9 @@
|
|
20
20
|
import logging
|
21
21
|
|
22
22
|
import httpx
|
23
|
+
from box import Box
|
23
24
|
|
24
|
-
from Ryzenth.types import QueryParameter
|
25
|
+
from Ryzenth.types import DownloaderBy, QueryParameter
|
25
26
|
|
26
27
|
LOGS = logging.getLogger("[Ryzenth] async")
|
27
28
|
|
@@ -31,6 +32,7 @@ class RyzenthXAsync:
|
|
31
32
|
self.base_url = base_url.rstrip("/")
|
32
33
|
self.headers = {"x-api-key": self.api_key}
|
33
34
|
self.images = self.ImagesAsync(self)
|
35
|
+
self.obj = Box
|
34
36
|
|
35
37
|
class ImagesAsync:
|
36
38
|
def __init__(self, parent):
|
@@ -47,7 +49,13 @@ class RyzenthXAsync:
|
|
47
49
|
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
48
50
|
return None
|
49
51
|
|
50
|
-
async def send_downloader(
|
52
|
+
async def send_downloader(
|
53
|
+
self,
|
54
|
+
switch_name: str = None,
|
55
|
+
params: DownloaderBy = None,
|
56
|
+
list_key=False,
|
57
|
+
dot_access=False
|
58
|
+
):
|
51
59
|
dl_dict = {
|
52
60
|
"teraboxv4": "terabox-v4",
|
53
61
|
"twitterv3": "twitter-v3",
|
@@ -82,14 +90,21 @@ class RyzenthXAsync:
|
|
82
90
|
timeout=10
|
83
91
|
)
|
84
92
|
response.raise_for_status()
|
85
|
-
return response.json()
|
93
|
+
return self.obj(response.json() or {}) if dot_access else response.json()
|
86
94
|
except httpx.HTTPError as e:
|
87
95
|
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
88
96
|
return None
|
89
97
|
|
90
|
-
async def send_message(
|
98
|
+
async def send_message(
|
99
|
+
self,
|
100
|
+
model: str = None,
|
101
|
+
params: QueryParameter = None,
|
102
|
+
list_key=False,
|
103
|
+
dot_access=False
|
104
|
+
):
|
91
105
|
model_dict = {
|
92
106
|
"hybrid": "AkenoX-1.9-Hybrid",
|
107
|
+
"hybrid-english": "AkenoX-1.9-Hybrid-Englsih",
|
93
108
|
"melayu": "lu-melayu",
|
94
109
|
"nocodefou": "nocodefou",
|
95
110
|
"mia": "mia-khalifah",
|
@@ -118,7 +133,7 @@ class RyzenthXAsync:
|
|
118
133
|
timeout=10
|
119
134
|
)
|
120
135
|
response.raise_for_status()
|
121
|
-
return response.json()
|
136
|
+
return self.obj(response.json() or {}) if dot_access else response.json()
|
122
137
|
except httpx.HTTPError as e:
|
123
138
|
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
124
139
|
return None
|
Ryzenth/_synchisded.py
CHANGED
@@ -20,8 +20,9 @@
|
|
20
20
|
import logging
|
21
21
|
|
22
22
|
import httpx
|
23
|
+
from box import Box
|
23
24
|
|
24
|
-
from Ryzenth.types import QueryParameter
|
25
|
+
from Ryzenth.types import DownloaderBy, QueryParameter
|
25
26
|
|
26
27
|
LOGS = logging.getLogger("[Ryzenth] sync")
|
27
28
|
|
@@ -31,6 +32,7 @@ class RyzenthXSync:
|
|
31
32
|
self.base_url = base_url.rstrip("/")
|
32
33
|
self.headers = {"x-api-key": self.api_key}
|
33
34
|
self.images = self.ImagesSync(self)
|
35
|
+
self.obj = Box
|
34
36
|
|
35
37
|
class ImagesSync:
|
36
38
|
def __init__(self, parent):
|
@@ -51,7 +53,13 @@ class RyzenthXSync:
|
|
51
53
|
LOGS.error(f"[SYNC] Error fetching from images {e}")
|
52
54
|
return None
|
53
55
|
|
54
|
-
def send_downloader(
|
56
|
+
def send_downloader(
|
57
|
+
self,
|
58
|
+
switch_name: str = None,
|
59
|
+
params: DownloaderBy = None,
|
60
|
+
list_key=False,
|
61
|
+
dot_access=False
|
62
|
+
):
|
55
63
|
dl_dict = {
|
56
64
|
"teraboxv4": "terabox-v4",
|
57
65
|
"twitterv3": "twitter-v3",
|
@@ -84,14 +92,21 @@ class RyzenthXSync:
|
|
84
92
|
timeout=10
|
85
93
|
)
|
86
94
|
response.raise_for_status()
|
87
|
-
return response.json()
|
95
|
+
return self.obj(response.json() or {}) if dot_access else response.json()
|
88
96
|
except httpx.HTTPError as e:
|
89
97
|
LOGS.error(f"[SYNC] Error fetching from downloader {e}")
|
90
98
|
return None
|
91
99
|
|
92
|
-
def send_message(
|
100
|
+
def send_message(
|
101
|
+
self,
|
102
|
+
model: str = None,
|
103
|
+
params: QueryParameter = None,
|
104
|
+
list_key=False,
|
105
|
+
dot_access=False
|
106
|
+
):
|
93
107
|
model_dict = {
|
94
108
|
"hybrid": "AkenoX-1.9-Hybrid",
|
109
|
+
"hybrid-english": "AkenoX-1.9-Hybrid-Englsih",
|
95
110
|
"melayu": "lu-melayu",
|
96
111
|
"nocodefou": "nocodefou",
|
97
112
|
"mia": "mia-khalifah",
|
@@ -119,7 +134,7 @@ class RyzenthXSync:
|
|
119
134
|
timeout=10
|
120
135
|
)
|
121
136
|
response.raise_for_status()
|
122
|
-
return response.json()
|
137
|
+
return self.obj(response.json() or {}) if dot_access else response.json()
|
123
138
|
except httpx.HTTPError as e:
|
124
139
|
LOGS.error(f"[SYNC] Error fetching from akenox: {e}")
|
125
140
|
return None
|
Ryzenth/ryzenth_client.py
CHANGED
@@ -24,9 +24,17 @@ from Ryzenth._synchisded import RyzenthXSync
|
|
24
24
|
|
25
25
|
|
26
26
|
class ApiKeyFrom:
|
27
|
-
def __init__(self, api_key: str = None):
|
27
|
+
def __init__(self, api_key: str = None, is_free_from_ryzenth=False):
|
28
|
+
if api_key is Ellipsis:
|
29
|
+
is_free_from_ryzenth = True
|
30
|
+
api_key = None
|
31
|
+
|
28
32
|
if not api_key:
|
29
33
|
api_key = os.environ.get("RYZENTH_API_KEY")
|
34
|
+
|
35
|
+
if not api_key:
|
36
|
+
api_key = "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC" if is_free_from_ryzenth else None
|
37
|
+
|
30
38
|
self.api_key = api_key
|
31
39
|
self.aio = RyzenthXAsync(api_key)
|
32
40
|
self._sync = RyzenthXSync(api_key)
|
Ryzenth/types/__init__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Ryzenth
|
3
|
-
Version: 1.8.
|
3
|
+
Version: 1.8.6
|
4
4
|
Summary: Ryzenth Python Wrapper For Perfomance
|
5
5
|
Author: TeamKillerX
|
6
6
|
License: MIT
|
@@ -86,7 +86,7 @@ pip install ryzenth[fast]
|
|
86
86
|
from Ryzenth import ApiKeyFrom
|
87
87
|
from Ryzenth.types import QueryParameter
|
88
88
|
|
89
|
-
ryz = ApiKeyFrom(
|
89
|
+
ryz = ApiKeyFrom(..., is_free_from_ryzenth=True)
|
90
90
|
|
91
91
|
await ryz.aio.send_message(
|
92
92
|
"hybrid",
|
@@ -102,7 +102,7 @@ await ryz.aio.send_message(
|
|
102
102
|
from Ryzenth import ApiKeyFrom
|
103
103
|
from Ryzenth.types import QueryParameter
|
104
104
|
|
105
|
-
ryz = ApiKeyFrom(
|
105
|
+
ryz = ApiKeyFrom(..., is_free_from_ryzenth=True)
|
106
106
|
ryz._sync.send_message(
|
107
107
|
"hybrid",
|
108
108
|
QueryParameter(
|
@@ -112,7 +112,7 @@ ryz._sync.send_message(
|
|
112
112
|
```
|
113
113
|
|
114
114
|
## Environment Variable Support
|
115
|
-
- Available API key v2 via [`@
|
115
|
+
- Available API key v2 via [`@RyzenthKeyBot`](https://t.me/RyzenthKeyBot)
|
116
116
|
|
117
117
|
You can skip passing the API key directly by setting it via environment:
|
118
118
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Ryzenth/__init__.py,sha256=Xkdo2DrOr9eOGlRdLUC9blzsuHHGIC9WrzGs1j83d3I,944
|
2
|
+
Ryzenth/__version__.py,sha256=_6wO1xA9F2oKC3CWMcHVuw6hDO0q5ldjO5IZQBEbXcs,118
|
3
|
+
Ryzenth/_asynchisded.py,sha256=4EKYIiyd7-WV2EALZf8AoZhybpywZSBbSZq0sNmo5cs,5034
|
4
|
+
Ryzenth/_synchisded.py,sha256=RtfqFF43AMt9_0hqhWvT3MzwQwpCJ6Qw38K3flilCD8,4857
|
5
|
+
Ryzenth/ryzenth_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
|
6
|
+
Ryzenth/types/__init__.py,sha256=imnQqDE2egYlFm2_4DRjleLLkFTRthcdZChRBVJvjoc,983
|
7
|
+
ryzenth-1.8.6.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
8
|
+
ryzenth-1.8.6.dist-info/METADATA,sha256=zB1_iHjlMyiyqT1DrLlhZN8Tw6Kqm_VR1aDiS5hWLdY,4181
|
9
|
+
ryzenth-1.8.6.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
10
|
+
ryzenth-1.8.6.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
11
|
+
ryzenth-1.8.6.dist-info/RECORD,,
|
ryzenth-1.8.4.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Ryzenth/__init__.py,sha256=-_DvsIrYN1rtnUJzhhgRjdCspuD26jh_AbQBtDkmoyo,944
|
2
|
-
Ryzenth/__version__.py,sha256=U4Oh60YYMdoTeWEiC3y486tZx2iKcH8DDL_2cohgg80,118
|
3
|
-
Ryzenth/_asynchisded.py,sha256=jZ-TtuIra_yI4PqW1rOrxFphdc3jK9CyhzvJh7U1DBg,4690
|
4
|
-
Ryzenth/_synchisded.py,sha256=Dd2NBZq5AS-kVu8UBLDS04vDW7M_0aGBc7ZIY0hcLkw,4513
|
5
|
-
Ryzenth/ryzenth_client.py,sha256=fN_0BcK0ao6-CTpe5bRCT9jQD7Krr_Q8-Xlf-aFqdZY,1225
|
6
|
-
Ryzenth/types/__init__.py,sha256=Uq5xqwfI5f-QwEnDRycQFJ5_yJbwzZwsM4cqgo_Wpbw,985
|
7
|
-
ryzenth-1.8.4.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
8
|
-
ryzenth-1.8.4.dist-info/METADATA,sha256=unUwDgxs4MIzZqfa9zDrqHMHQs2JasNpJIYYdhu7JGc,4143
|
9
|
-
ryzenth-1.8.4.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
10
|
-
ryzenth-1.8.4.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
11
|
-
ryzenth-1.8.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|