Ryzenth 1.9.8__py3-none-any.whl → 2.0.0__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/__version__.py +1 -1
- Ryzenth/_asynchisded.py +33 -57
- Ryzenth/_errors.py +9 -1
- Ryzenth/_shared.py +46 -0
- Ryzenth/_synchisded.py +22 -51
- Ryzenth/helper/_decorators.py +4 -1
- Ryzenth/helper/_moderator.py +3 -0
- Ryzenth/helper/_ryzenth.py +2 -2
- Ryzenth/helper/_thinking.py +3 -3
- Ryzenth/pyoraddons/__init__.py +41 -2
- Ryzenth/tests/__init__.py +0 -0
- Ryzenth/tests/test_deepseek.py +13 -0
- Ryzenth/tests/test_moderator.py +12 -0
- Ryzenth/tests/test_send.py +20 -0
- Ryzenth/tests/test_send_downloader.py +14 -0
- {ryzenth-1.9.8.dist-info → ryzenth-2.0.0.dist-info}/METADATA +8 -3
- ryzenth-2.0.0.dist-info/RECORD +28 -0
- ryzenth-1.9.8.dist-info/RECORD +0 -22
- {ryzenth-1.9.8.dist-info → ryzenth-2.0.0.dist-info}/WHEEL +0 -0
- {ryzenth-1.9.8.dist-info → ryzenth-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.9.8.dist-info → ryzenth-2.0.0.dist-info}/top_level.txt +0 -0
Ryzenth/__version__.py
CHANGED
Ryzenth/_asynchisded.py
CHANGED
@@ -18,11 +18,13 @@
|
|
18
18
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
import logging
|
21
|
+
from typing import Union
|
21
22
|
|
22
23
|
import httpx
|
23
24
|
from box import Box
|
24
25
|
|
25
|
-
from ._errors import WhatFuckError
|
26
|
+
from ._errors import InvalidModelError, WhatFuckError
|
27
|
+
from ._shared import BASE_DICT_AI_RYZENTH, BASE_DICT_OFFICIAL, BASE_DICT_RENDER
|
26
28
|
from .helper import (
|
27
29
|
FbanAsync,
|
28
30
|
FontsAsync,
|
@@ -62,87 +64,61 @@ class RyzenthXAsync:
|
|
62
64
|
|
63
65
|
async def send_downloader(
|
64
66
|
self,
|
65
|
-
switch_name: str
|
66
|
-
|
67
|
-
|
67
|
+
switch_name: str,
|
68
|
+
*,
|
69
|
+
params: Union[DownloaderBy, QueryParameter] = None,
|
70
|
+
on_render=False,
|
68
71
|
dot_access=False
|
69
72
|
):
|
70
|
-
dl_dict = {
|
71
|
-
"teraboxv4": "terabox-v4",
|
72
|
-
"twitterv3": "twitter-v3",
|
73
|
-
"xnxxinfov2": "xnxx-info-v2",
|
74
|
-
"instagramv4": "instagram-v4",
|
75
|
-
"instagramv3": "instagram-v3",
|
76
|
-
"instagramv2": "instagram-v2",
|
77
|
-
"instagram": "instagram",
|
78
|
-
"twitter": "twitter",
|
79
|
-
"tiktok": "tiktok",
|
80
|
-
"tiktokv2": "tiktok-v2",
|
81
|
-
"facebook": "fb",
|
82
|
-
"snapsave": "snapsave",
|
83
|
-
"savefrom": "savefrom"
|
84
|
-
}
|
85
|
-
if list_key:
|
86
|
-
return list(dl_dict.keys())
|
87
|
-
|
88
|
-
if not switch_name:
|
89
|
-
raise ValueError("`switch_name` is required. Use `list_key=True` to see all valid options.")
|
90
73
|
|
74
|
+
dl_dict = BASE_DICT_RENDER if on_render else BASE_DICT_OFFICIAL
|
91
75
|
model_name = dl_dict.get(switch_name)
|
92
76
|
if not model_name:
|
93
|
-
raise
|
77
|
+
raise InvalidModelError(f"Invalid switch_name: {switch_name}")
|
94
78
|
|
95
79
|
async with httpx.AsyncClient() as client:
|
96
80
|
try:
|
97
|
-
response = await
|
98
|
-
f"{self.base_url}/v1/dl/{model_name}",
|
99
|
-
params=params.dict(),
|
100
|
-
headers=self.headers,
|
101
|
-
timeout=self.timeout
|
102
|
-
)
|
81
|
+
response = await self._client_downloader_get(client, params, model_name)
|
103
82
|
response.raise_for_status()
|
104
83
|
return self.obj(response.json() or {}) if dot_access else response.json()
|
105
84
|
except httpx.HTTPError as e:
|
106
85
|
self.logger.error(f"[ASYNC] Error: {str(e)}")
|
107
86
|
raise WhatFuckError("[ASYNC] Error fetching") from e
|
108
87
|
|
88
|
+
async def _client_message_get(self, client, params, model_param):
|
89
|
+
return await client.get(
|
90
|
+
f"{self.base_url}/v1/ai/akenox/{model_param}",
|
91
|
+
params=params.model_dump(),
|
92
|
+
headers=self.headers,
|
93
|
+
timeout=self.timeout
|
94
|
+
)
|
95
|
+
|
96
|
+
async def _client_downloader_get(self, client, params, model_param):
|
97
|
+
return await client.get(
|
98
|
+
f"{self.base_url}/v1/dl/{model_param}",
|
99
|
+
params=params.model_dump(),
|
100
|
+
headers=self.headers,
|
101
|
+
timeout=self.timeout
|
102
|
+
)
|
103
|
+
|
109
104
|
async def send_message(
|
110
105
|
self,
|
111
|
-
model: str
|
106
|
+
model: str,
|
107
|
+
*,
|
112
108
|
params: QueryParameter = None,
|
113
|
-
|
109
|
+
use_full_model_list=False,
|
114
110
|
dot_access=False
|
115
111
|
):
|
116
|
-
model_dict = {
|
117
|
-
"hybrid": "AkenoX-1.9-Hybrid",
|
118
|
-
"hybrid-english": "AkenoX-1.9-Hybrid-Englsih",
|
119
|
-
"melayu": "lu-melayu",
|
120
|
-
"nocodefou": "nocodefou",
|
121
|
-
"mia": "mia-khalifah",
|
122
|
-
"curlmcode": "curl-command-code",
|
123
|
-
"quotessad": "quotes-sad",
|
124
|
-
"quoteslucu": "quotes-lucu",
|
125
|
-
"lirikend": "lirik-end",
|
126
|
-
"alsholawat": "al-sholawat"
|
127
|
-
}
|
128
|
-
if list_key:
|
129
|
-
return list(model_dict.keys())
|
130
|
-
|
131
|
-
if not model:
|
132
|
-
raise ValueError("`model` is required. Use `list_key=True` to see all valid options.")
|
133
112
|
|
113
|
+
model_dict = BASE_DICT_AI_RYZENTH if use_full_model_list else {"hybrid": "AkenoX-1.9-Hybrid"}
|
134
114
|
model_param = model_dict.get(model)
|
115
|
+
|
135
116
|
if not model_param:
|
136
|
-
raise
|
117
|
+
raise InvalidModelError(f"Invalid model name: {model}")
|
137
118
|
|
138
119
|
async with httpx.AsyncClient() as client:
|
139
120
|
try:
|
140
|
-
response = await
|
141
|
-
f"{self.base_url}/v1/ai/akenox/{model_param}",
|
142
|
-
params=params.dict(),
|
143
|
-
headers=self.headers,
|
144
|
-
timeout=self.timeout
|
145
|
-
)
|
121
|
+
response = await self._client_message_get(client, params, model_param)
|
146
122
|
response.raise_for_status()
|
147
123
|
return self.obj(response.json() or {}) if dot_access else response.json()
|
148
124
|
except httpx.HTTPError as e:
|
Ryzenth/_errors.py
CHANGED
@@ -26,6 +26,12 @@ class WhatFuckError(Exception):
|
|
26
26
|
class ParamsRequiredError(ValueError):
|
27
27
|
pass
|
28
28
|
|
29
|
+
class RequiredError(ValueError):
|
30
|
+
pass
|
31
|
+
|
32
|
+
class InvalidModelError(ValueError):
|
33
|
+
pass
|
34
|
+
|
29
35
|
class UnauthorizedAccessError(ValueError):
|
30
36
|
pass
|
31
37
|
|
@@ -44,5 +50,7 @@ __all__ = [
|
|
44
50
|
"InvalidVersionError",
|
45
51
|
"InvalidJSONDecodeError",
|
46
52
|
"InvalidEmptyError",
|
47
|
-
"
|
53
|
+
"InvalidModelError",
|
54
|
+
"UnauthorizedAccessError",
|
55
|
+
"RequiredError"
|
48
56
|
]
|
Ryzenth/_shared.py
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# this API is different
|
2
|
+
|
3
|
+
BASE_DICT_RENDER = {
|
4
|
+
"transcript": "transcript-dl", #url #render
|
5
|
+
"pinterest": "pinterest-dl", #url #render
|
6
|
+
"fbvideo": "fbvideo-dl", #url #render
|
7
|
+
"fbphoto": "fbphoto-dl", #url #render
|
8
|
+
"tiktok": "tiktok-dl", #url #render
|
9
|
+
"youtube-mp3": "youtube-mp3-dl", #url #render
|
10
|
+
"youtube-mp4": "youtube-mp4-dl", #url #render
|
11
|
+
"instagram": "instagram-dl", #url # render
|
12
|
+
"lyrics-search": "lyrics-search-dl", #query #render
|
13
|
+
"yt-search": "yt-search-dl", #query #render
|
14
|
+
"google-search": "google-search-dl", #query #render
|
15
|
+
"pinterest-search": "pinterest-search-dl", #query #render
|
16
|
+
"tiktok-search": "tiktok-search-dl" #query #render
|
17
|
+
}
|
18
|
+
|
19
|
+
BASE_DICT_OFFICIAL = {
|
20
|
+
"teraboxv4": "terabox-v4",
|
21
|
+
"twitterv3": "twitter-v3",
|
22
|
+
"xnxxinfov2": "xnxx-info-v2",
|
23
|
+
"instagramv4": "instagram-v4",
|
24
|
+
"instagramv3": "instagram-v3",
|
25
|
+
"instagramv2": "instagram-v2",
|
26
|
+
"instagram-v0": "instagram",
|
27
|
+
"twitter": "twitter",
|
28
|
+
"tiktok-v0": "tiktok",
|
29
|
+
"tiktokv2": "tiktok-v2",
|
30
|
+
"facebook": "fb",
|
31
|
+
"snapsave": "snapsave",
|
32
|
+
"savefrom": "savefrom"
|
33
|
+
}
|
34
|
+
|
35
|
+
BASE_DICT_AI_RYZENTH = {
|
36
|
+
"hybrid": "AkenoX-1.9-Hybrid",
|
37
|
+
"hybrid-english": "AkenoX-1.9-Hybrid-English",
|
38
|
+
"melayu": "lu-melayu",
|
39
|
+
"nocodefou": "nocodefou",
|
40
|
+
"mia": "mia-khalifah",
|
41
|
+
"curlmcode": "curl-command-code",
|
42
|
+
"quotessad": "quotes-sad",
|
43
|
+
"quoteslucu": "quotes-lucu",
|
44
|
+
"lirikend": "lirik-end",
|
45
|
+
"alsholawat": "al-sholawat"
|
46
|
+
}
|
Ryzenth/_synchisded.py
CHANGED
@@ -18,11 +18,13 @@
|
|
18
18
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
import logging
|
21
|
+
from typing import Union
|
21
22
|
|
22
23
|
import httpx
|
23
24
|
from box import Box
|
24
25
|
|
25
|
-
from ._errors import WhatFuckError
|
26
|
+
from ._errors import InvalidModelError, WhatFuckError
|
27
|
+
from ._shared import BASE_DICT_AI_RYZENTH, BASE_DICT_OFFICIAL, BASE_DICT_RENDER
|
26
28
|
from .helper import (
|
27
29
|
FbanSync,
|
28
30
|
FontsSync,
|
@@ -60,43 +62,22 @@ class RyzenthXSync:
|
|
60
62
|
handler.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(message)s"))
|
61
63
|
self.logger.addHandler(handler)
|
62
64
|
|
63
|
-
|
64
|
-
|
65
65
|
def send_downloader(
|
66
66
|
self,
|
67
|
-
switch_name: str
|
68
|
-
|
69
|
-
|
67
|
+
switch_name: str,
|
68
|
+
*,
|
69
|
+
params: Union[DownloaderBy, QueryParameter] = None,
|
70
|
+
on_render=False,
|
70
71
|
dot_access=False
|
71
72
|
):
|
72
|
-
dl_dict =
|
73
|
-
"teraboxv4": "terabox-v4",
|
74
|
-
"twitterv3": "twitter-v3",
|
75
|
-
"xnxxinfov2": "xnxx-info-v2",
|
76
|
-
"instagramv4": "instagram-v4",
|
77
|
-
"instagramv3": "instagram-v3",
|
78
|
-
"instagramv2": "instagram-v2",
|
79
|
-
"instagram": "instagram",
|
80
|
-
"twitter": "twitter",
|
81
|
-
"tiktok": "tiktok",
|
82
|
-
"tiktokv2": "tiktok-v2",
|
83
|
-
"facebook": "fb",
|
84
|
-
"snapsave": "snapsave",
|
85
|
-
"savefrom": "savefrom"
|
86
|
-
}
|
87
|
-
if list_key:
|
88
|
-
return list(dl_dict.keys())
|
89
|
-
|
90
|
-
if not switch_name:
|
91
|
-
raise ValueError("`switch_name` is required. Use `list_key=True` to see all valid options.")
|
92
|
-
|
73
|
+
dl_dict = BASE_DICT_RENDER if on_render else BASE_DICT_OFFICIAL
|
93
74
|
model_name = dl_dict.get(switch_name)
|
94
75
|
if not model_name:
|
95
|
-
raise
|
76
|
+
raise InvalidModelError(f"Invalid switch_name: {switch_name}")
|
96
77
|
try:
|
97
78
|
response = httpx.get(
|
98
79
|
f"{self.base_url}/v1/dl/{model_name}",
|
99
|
-
params=params.
|
80
|
+
params=params.model_dump(),
|
100
81
|
headers=self.headers,
|
101
82
|
timeout=self.timeout
|
102
83
|
)
|
@@ -105,40 +86,27 @@ class RyzenthXSync:
|
|
105
86
|
except httpx.HTTPError as e:
|
106
87
|
self.logger.error(f"[SYNC] Error fetching from downloader {e}")
|
107
88
|
raise WhatFuckError("[SYNC] Error fetching from downloader") from e
|
89
|
+
except httpx.ReadTimeout as e:
|
90
|
+
self.logger.error(f"[SYNC] Error ReadTimeout from downloader {e}")
|
91
|
+
raise WhatFuckError("[SYNC] Error ReadTimeout from downloader ") from e
|
108
92
|
|
109
93
|
def send_message(
|
110
94
|
self,
|
111
|
-
model: str
|
95
|
+
model: str,
|
96
|
+
*,
|
112
97
|
params: QueryParameter = None,
|
113
|
-
|
98
|
+
use_full_model_list=False,
|
114
99
|
dot_access=False
|
115
100
|
):
|
116
|
-
model_dict = {
|
117
|
-
"hybrid": "AkenoX-1.9-Hybrid",
|
118
|
-
"hybrid-english": "AkenoX-1.9-Hybrid-Englsih",
|
119
|
-
"melayu": "lu-melayu",
|
120
|
-
"nocodefou": "nocodefou",
|
121
|
-
"mia": "mia-khalifah",
|
122
|
-
"curlmcode": "curl-command-code",
|
123
|
-
"quotessad": "quotes-sad",
|
124
|
-
"quoteslucu": "quotes-lucu",
|
125
|
-
"lirikend": "lirik-end",
|
126
|
-
"alsholawat": "al-sholawat"
|
127
|
-
}
|
128
|
-
if list_key:
|
129
|
-
return list(model_dict.keys())
|
130
|
-
|
131
|
-
if not model:
|
132
|
-
raise ValueError("`model` is required. Use `list_key=True` to see all valid options.")
|
133
|
-
|
101
|
+
model_dict = BASE_DICT_AI_RYZENTH if use_full_model_list else {"hybrid": "AkenoX-1.9-Hybrid"}
|
134
102
|
model_param = model_dict.get(model)
|
135
103
|
if not model_param:
|
136
|
-
raise
|
104
|
+
raise InvalidModelError(f"Invalid model name: {model}")
|
137
105
|
|
138
106
|
try:
|
139
107
|
response = httpx.get(
|
140
108
|
f"{self.base_url}/v1/ai/akenox/{model_param}",
|
141
|
-
params=params.
|
109
|
+
params=params.model_dump(),
|
142
110
|
headers=self.headers,
|
143
111
|
timeout=self.timeout
|
144
112
|
)
|
@@ -147,3 +115,6 @@ class RyzenthXSync:
|
|
147
115
|
except httpx.HTTPError as e:
|
148
116
|
self.logger.error(f"[SYNC] Error fetching from akenox: {e}")
|
149
117
|
raise WhatFuckError("[SYNC] Error fetching from akenox") from e
|
118
|
+
except httpx.ReadTimeout as e:
|
119
|
+
self.logger.error(f"[SYNC] Error ReadTimeout from Akenox {e}")
|
120
|
+
raise WhatFuckError("[SYNC] Error ReadTimeout from akenox") from e
|
Ryzenth/helper/_decorators.py
CHANGED
@@ -40,7 +40,10 @@ class Decorators:
|
|
40
40
|
"Please provide a query after the command.", **kwargs
|
41
41
|
)
|
42
42
|
result = await self._clients_ai.aio.send_message(
|
43
|
-
name,
|
43
|
+
model=name,
|
44
|
+
params=QueryParameter(query=query),
|
45
|
+
use_full_model_list=True,
|
46
|
+
dot_access=True
|
44
47
|
)
|
45
48
|
await message.reply_text(result.results, **kwargs)
|
46
49
|
return await func(client, message, query, *args, **kwargs)
|
Ryzenth/helper/_moderator.py
CHANGED
@@ -143,3 +143,6 @@ class ModeratorSync:
|
|
143
143
|
except self.parent.httpx.HTTPError as e:
|
144
144
|
self.parent.logger.error(f"[SYNC] Error fetching from antievalai {e}")
|
145
145
|
raise WhatFuckError("[SYNC] Error fetching from antievalai") from e
|
146
|
+
except self.parent.httpx.ReadTimeout as e:
|
147
|
+
self.parent.logger.error(f"[SYNC] Error ReadTimeout from antievalai {e}")
|
148
|
+
raise WhatFuckError("[SYNC] Error ReadTimeout from antievalai") from e
|
Ryzenth/helper/_ryzenth.py
CHANGED
@@ -33,7 +33,7 @@ class HumanizeAsync:
|
|
33
33
|
try:
|
34
34
|
response = await client.get(
|
35
35
|
url,
|
36
|
-
params=params.
|
36
|
+
params=params.model_dump(),
|
37
37
|
headers=self.parent.headers,
|
38
38
|
timeout=self.parent.timeout
|
39
39
|
)
|
@@ -55,7 +55,7 @@ class HumanizeSync:
|
|
55
55
|
try:
|
56
56
|
response = self.parent.httpx.get(
|
57
57
|
url,
|
58
|
-
params=params.
|
58
|
+
params=params.model_dump(),
|
59
59
|
headers=self.parent.headers,
|
60
60
|
timeout=self.parent.timeout
|
61
61
|
)
|
Ryzenth/helper/_thinking.py
CHANGED
@@ -32,7 +32,7 @@ class WhatAsync:
|
|
32
32
|
try:
|
33
33
|
response = await client.get(
|
34
34
|
url,
|
35
|
-
params=params.
|
35
|
+
params=params.model_dump(),
|
36
36
|
headers=self.parent.headers,
|
37
37
|
timeout=self.parent.timeout
|
38
38
|
)
|
@@ -51,12 +51,12 @@ class WhatSync:
|
|
51
51
|
try:
|
52
52
|
response = self.parent.httpx.get(
|
53
53
|
url,
|
54
|
-
params=params.
|
54
|
+
params=params.model_dump(),
|
55
55
|
headers=self.parent.headers,
|
56
56
|
timeout=self.parent.timeout
|
57
57
|
)
|
58
58
|
response.raise_for_status()
|
59
59
|
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
60
|
-
except httpx.HTTPError as e:
|
60
|
+
except self.parent.httpx.HTTPError as e:
|
61
61
|
self.parent.logger.error(f"[SYNC] Error fetching from deepseek {e}")
|
62
62
|
raise WhatFuckError("[SYNC] Error fetching from deepseek") from e
|
Ryzenth/pyoraddons/__init__.py
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
from functools import wraps
|
21
21
|
|
22
|
-
from .._errors import UnauthorizedAccessError
|
22
|
+
from .._errors import RequiredError, UnauthorizedAccessError
|
23
23
|
|
24
24
|
|
25
25
|
def unauthorized_access(
|
@@ -43,4 +43,43 @@ def unauthorized_access(
|
|
43
43
|
return wrapper
|
44
44
|
return decorator
|
45
45
|
|
46
|
-
|
46
|
+
def callback_unauthorized_access(
|
47
|
+
user_list: list = None,
|
48
|
+
author_only: bool = False,
|
49
|
+
member_only: bool = False
|
50
|
+
):
|
51
|
+
"Credits by @xtdevs"
|
52
|
+
def decorator(func):
|
53
|
+
@wraps(func)
|
54
|
+
async def wrapper(client, callback):
|
55
|
+
if author_only and callback.from_user.id != client.me.id:
|
56
|
+
return await callback.answer("This Unauthorized Access Only Owner.", True)
|
57
|
+
if member_only and callback.from_user.id not in user_list:
|
58
|
+
return await callback.answer("This Unauthorized Access Only Members.", True)
|
59
|
+
return await func(client, callback)
|
60
|
+
|
61
|
+
if sum([author_only, member_only]) > 1:
|
62
|
+
raise UnauthorizedAccessError("Only one of author_only, or member_only can be True")
|
63
|
+
|
64
|
+
return wrapper
|
65
|
+
return decorator
|
66
|
+
|
67
|
+
def admin_only(enums_type=None):
|
68
|
+
"Credits by @xtdevs"
|
69
|
+
def decorator(func):
|
70
|
+
@wraps(func)
|
71
|
+
async def wrapper(client, message):
|
72
|
+
if enums_type is None:
|
73
|
+
raise RequiredError("Required enums_type")
|
74
|
+
member = await client.get_chat_member(message.chat.id, message.from_user.id)
|
75
|
+
if member.status not in {enums_type.ADMINISTRATOR, enums_type.OWNER}:
|
76
|
+
return await message.reply_text("Only admin can!")
|
77
|
+
return await func(client, message)
|
78
|
+
return wrapper
|
79
|
+
return decorator
|
80
|
+
|
81
|
+
__all__ = [
|
82
|
+
"unauthorized_access",
|
83
|
+
"callback_unauthorized_access",
|
84
|
+
"admin_only"
|
85
|
+
]
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
from Ryzenth import ApiKeyFrom
|
2
|
+
from Ryzenth.types import QueryParameter # disarankan gunakan absolute import
|
3
|
+
|
4
|
+
|
5
|
+
def test_send_message():
|
6
|
+
ryz = ApiKeyFrom(..., is_ok=True)
|
7
|
+
result = ryz._sync.send_message(
|
8
|
+
model="hybrid",
|
9
|
+
params=QueryParameter(query="hello world!")
|
10
|
+
)
|
11
|
+
assert result is not None
|
12
|
+
|
13
|
+
def test_send_message_melayu():
|
14
|
+
ryz = ApiKeyFrom(..., is_ok=True)
|
15
|
+
result = ryz._sync.send_message(
|
16
|
+
model="melayu",
|
17
|
+
params=QueryParameter(query="Ok Test"),
|
18
|
+
use_full_model_list=True
|
19
|
+
)
|
20
|
+
assert result is not None
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from Ryzenth._synchisded import RyzenthXSync
|
2
|
+
from Ryzenth.types import QueryParameter
|
3
|
+
|
4
|
+
|
5
|
+
def test_send_downloader():
|
6
|
+
ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
|
7
|
+
result = ryz.send_downloader(
|
8
|
+
switch_name="tiktok-search",
|
9
|
+
params=QueryParameter(
|
10
|
+
query="cat coding"
|
11
|
+
),
|
12
|
+
on_render=True
|
13
|
+
)
|
14
|
+
assert result is not None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Ryzenth
|
3
|
-
Version:
|
3
|
+
Version: 2.0.0
|
4
4
|
Summary: Ryzenth Python Wrapper For Perfomance
|
5
5
|
Author: TeamKillerX
|
6
6
|
License: MIT
|
@@ -58,6 +58,11 @@ Dynamic: summary
|
|
58
58
|
[](https://pypi.org/project/Ryzenth)
|
59
59
|
[](https://results.pre-commit.ci/latest/github/TeamKillerX/Ryzenth/main)
|
60
60
|
|
61
|
+
<div align="center">
|
62
|
+
<a href="https://pepy.tech/project/Ryzenth"><img src="https://static.pepy.tech/badge/Ryzenth" alt="Downloads"></a>
|
63
|
+
<a href="https://github.com/TeamKillerX/Ryzenth/workflows/"><img src="https://github.com/TeamKillerX/Ryzenth/actions/workflows/sync-tests.yml/badge.svg" alt="API Tests"/></a>
|
64
|
+
</div>
|
65
|
+
|
61
66
|
**Ryzenth** is a powerful and flexible Python SDK for interacting with the new **Ryzenth API V1** a successor to the Ryzenth API V1 supporting both synchronous and asynchronous workflows out of the box.
|
62
67
|
|
63
68
|
> Note: Ryzenth API V1 (**javascript**) is still alive and supported, but Ryzenth is the next generation.
|
@@ -83,7 +88,7 @@ pip install ryzenth[fast]
|
|
83
88
|
from Ryzenth import ApiKeyFrom
|
84
89
|
from Ryzenth.types import QueryParameter
|
85
90
|
|
86
|
-
ryz = ApiKeyFrom(...,
|
91
|
+
ryz = ApiKeyFrom(..., is_ok=True)
|
87
92
|
|
88
93
|
await ryz.aio.send_message(
|
89
94
|
"hybrid",
|
@@ -99,7 +104,7 @@ await ryz.aio.send_message(
|
|
99
104
|
from Ryzenth import ApiKeyFrom
|
100
105
|
from Ryzenth.types import QueryParameter
|
101
106
|
|
102
|
-
ryz = ApiKeyFrom(...,
|
107
|
+
ryz = ApiKeyFrom(..., is_ok=True)
|
103
108
|
ryz._sync.send_message(
|
104
109
|
"hybrid",
|
105
110
|
QueryParameter(
|
@@ -0,0 +1,28 @@
|
|
1
|
+
Ryzenth/__init__.py,sha256=vM1IVkgRFQT5o15KYKx8kY59114Jw5taP8ytm9YJy94,996
|
2
|
+
Ryzenth/__version__.py,sha256=ctmJK-WuzKOP4R3aVcQgNxINgByhKDXyOfiq9wCQwEM,118
|
3
|
+
Ryzenth/_asynchisded.py,sha256=Q3Ona5i11iKn23WHebPqnfyq4ZiDdXlfBszDFX9BhLc,4666
|
4
|
+
Ryzenth/_client.py,sha256=1DhB0Ey-XM8kSpP3ztNkGkrevyLssdFAwLf4mjI6DWU,1867
|
5
|
+
Ryzenth/_errors.py,sha256=PwXVGoRQQYw05YYsh7bCRxr3jpV5k31fXCNNweag8LY,1456
|
6
|
+
Ryzenth/_shared.py,sha256=FEaOjsvr0gb50Un3LkjCPNysaPEoVTit-6rkxCc3ZYg,1470
|
7
|
+
Ryzenth/_synchisded.py,sha256=4uj9Q6E4B4mmUm1A3MDd_T3zu2wtxmX20SdlExFGhLw,4661
|
8
|
+
Ryzenth/helper/__init__.py,sha256=BkP6fQ3IJnOqyXn07jD7anumVPlm8lVPNkFnK9b6XpE,1447
|
9
|
+
Ryzenth/helper/_decorators.py,sha256=rEdJRoQrJfqd4LqNOiFfPwEQwMU4uVuEsoqRuQfw99I,2125
|
10
|
+
Ryzenth/helper/_federation.py,sha256=pfqqGjg179f-olvW1Z7aX1nQf0GQJdSK4NDMaMDxmbA,14552
|
11
|
+
Ryzenth/helper/_fonts.py,sha256=Yy5qWdumGf0Y7tcvEXGLSn87mKlr-x_gmO241a465j8,3035
|
12
|
+
Ryzenth/helper/_images.py,sha256=oOqojWiiYMZja1LloY_c-qIbH-s35yENohpBbZYDHCc,2305
|
13
|
+
Ryzenth/helper/_moderator.py,sha256=fAi0Xxk6CSShXl94H0FT8oDn6FttVq3ysBiROjSesCw,5501
|
14
|
+
Ryzenth/helper/_openai.py,sha256=cbQkEZ_B4NQEnnqG4Wobf_k6HLtKfpeMRJ8vFPuEWUQ,2570
|
15
|
+
Ryzenth/helper/_ryzenth.py,sha256=VPjo09JOjtzS74AxUwcXsaWFGY923_scqZ2ujzBEa3A,2874
|
16
|
+
Ryzenth/helper/_thinking.py,sha256=OTmV9FQYVbsWupZA-jvywWJBdO6UyioVBkBMsFazBWQ,2566
|
17
|
+
Ryzenth/pyoraddons/__init__.py,sha256=Xt4w4YHoFKwMZe8QslhLKp6mHBjBowvYjzkN95ikpjU,3175
|
18
|
+
Ryzenth/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
+
Ryzenth/tests/test_deepseek.py,sha256=_KbYr-haKBt5Xc-YULBL9Ic5OM02SX17hvQWWjYpNAk,255
|
20
|
+
Ryzenth/tests/test_moderator.py,sha256=wc9A_0gx3LobMD7CDS-h2eTNPNYxeJk_rqtd2QTt428,291
|
21
|
+
Ryzenth/tests/test_send.py,sha256=yPQV3XRsPKBo4eSsz5kc2R6BEuru0zmMexYshX0Ac3s,573
|
22
|
+
Ryzenth/tests/test_send_downloader.py,sha256=dJ4nv2CANGBpamGCxNSX1YlqJNZkHtlGHjOBDuiNJ04,396
|
23
|
+
Ryzenth/types/__init__.py,sha256=5K66BoRKd0yKdIFxph8FwM6Tr8Ha4sbgFctYlAUUQfw,1206
|
24
|
+
ryzenth-2.0.0.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
25
|
+
ryzenth-2.0.0.dist-info/METADATA,sha256=SpQd_58exKR3UXWqHP5IjW1z1r4xbuOu3ddOcBkoOHU,4390
|
26
|
+
ryzenth-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
27
|
+
ryzenth-2.0.0.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
28
|
+
ryzenth-2.0.0.dist-info/RECORD,,
|
ryzenth-1.9.8.dist-info/RECORD
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Ryzenth/__init__.py,sha256=vM1IVkgRFQT5o15KYKx8kY59114Jw5taP8ytm9YJy94,996
|
2
|
-
Ryzenth/__version__.py,sha256=tnOfM98JgE-ddL33xjRITGFkrdaM2ylCWvNhoJq9y5E,118
|
3
|
-
Ryzenth/_asynchisded.py,sha256=lDNsIIk6KfEUjeqp1xwWJCT1Rbx2LYkEOCrCmq2hTXs,5428
|
4
|
-
Ryzenth/_client.py,sha256=1DhB0Ey-XM8kSpP3ztNkGkrevyLssdFAwLf4mjI6DWU,1867
|
5
|
-
Ryzenth/_errors.py,sha256=cx5BCwFsgUvZPGqHPPRM6S74esjJqIGNAGhBVw1dyYA,1320
|
6
|
-
Ryzenth/_synchisded.py,sha256=39JASRIBKr6mge5T2tMPUI8nbex26xtTtkTu1bcdN14,5251
|
7
|
-
Ryzenth/helper/__init__.py,sha256=BkP6fQ3IJnOqyXn07jD7anumVPlm8lVPNkFnK9b6XpE,1447
|
8
|
-
Ryzenth/helper/_decorators.py,sha256=jmBqzc3wyM8U28z-gf97M-kuBvMLE8laiV7hIqtaVgE,2026
|
9
|
-
Ryzenth/helper/_federation.py,sha256=pfqqGjg179f-olvW1Z7aX1nQf0GQJdSK4NDMaMDxmbA,14552
|
10
|
-
Ryzenth/helper/_fonts.py,sha256=Yy5qWdumGf0Y7tcvEXGLSn87mKlr-x_gmO241a465j8,3035
|
11
|
-
Ryzenth/helper/_images.py,sha256=oOqojWiiYMZja1LloY_c-qIbH-s35yENohpBbZYDHCc,2305
|
12
|
-
Ryzenth/helper/_moderator.py,sha256=Wj5GgFEiGsnDPqB49ho7Loc6QGhqh20FkC0PZWDfgUc,5281
|
13
|
-
Ryzenth/helper/_openai.py,sha256=cbQkEZ_B4NQEnnqG4Wobf_k6HLtKfpeMRJ8vFPuEWUQ,2570
|
14
|
-
Ryzenth/helper/_ryzenth.py,sha256=fI0kUbSN9iZV5VjrFQ2gdUqAG8tQZhiup5bOJi11zTE,2862
|
15
|
-
Ryzenth/helper/_thinking.py,sha256=w_R9iUtEiFib0TG9xfWfv0vljLYd6sWwzaB3nBOUy4w,2542
|
16
|
-
Ryzenth/pyoraddons/__init__.py,sha256=4FK9KTLgJ2ZgyP32UPWbHkHie-s1inTMn7604ojDIA0,1721
|
17
|
-
Ryzenth/types/__init__.py,sha256=5K66BoRKd0yKdIFxph8FwM6Tr8Ha4sbgFctYlAUUQfw,1206
|
18
|
-
ryzenth-1.9.8.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
19
|
-
ryzenth-1.9.8.dist-info/METADATA,sha256=XYjLyWEFVJAfK7zv3P9bgh2V0TV9o6IXd-dkJbGWRdg,4093
|
20
|
-
ryzenth-1.9.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
21
|
-
ryzenth-1.9.8.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
22
|
-
ryzenth-1.9.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|