Ryzenth 1.8.2__py3-none-any.whl → 1.8.3__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 CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "1.8.2"
1
+ __version__ = "1.8.3"
2
2
  __author__ = "TeamKillerX"
3
3
  __title__ = "Ryzenth"
4
4
  __description__ = "Ryzenth Python API Wrapper"
Ryzenth/_asynchisded.py CHANGED
@@ -31,7 +31,47 @@ class RyzenthXAsync:
31
31
  self.base_url = base_url.rstrip("/")
32
32
  self.headers = {"x-api-key": self.api_key}
33
33
 
34
- async def send_message(self, model: str, params: QueryParameter):
34
+ async def send_downloader(self, switch_name: str = None, params: QueryParameter = None, list_key=False):
35
+ dl_dict = {
36
+ "teraboxv4": "terabox-v4",
37
+ "twitterv3": "twitter-v3",
38
+ "xnxxinfov2": "xnxx-info-v2",
39
+ "instagramv4": "instagram-v4",
40
+ "instagramv3": "instagram-v3",
41
+ "instagramv2": "instagram-v2",
42
+ "instagram": "instagram",
43
+ "twitter": "twitter",
44
+ "tiktok": "tiktok",
45
+ "tiktokv2": "tiktok-v2",
46
+ "facebook": "fb",
47
+ "snapsave": "snapsave",
48
+ "savefrom": "savefrom"
49
+ }
50
+ if list_key:
51
+ return list(dl_dict.keys())
52
+
53
+ if not switch_name:
54
+ raise ValueError("`switch_name` is required. Use `list_key=True` to see all valid options.")
55
+
56
+ model_name = dl_dict.get(switch_name)
57
+ if not model_name:
58
+ raise ValueError(f"Invalid switch_name: {switch_name}")
59
+
60
+ async with httpx.AsyncClient() as client:
61
+ try:
62
+ response = await client.get(
63
+ f"{self.base_url}/v1/dl/{model_name}",
64
+ params=params.dict(),
65
+ headers=self.headers,
66
+ timeout=10
67
+ )
68
+ response.raise_for_status()
69
+ return response.json()
70
+ except httpx.HTTPError as e:
71
+ LOGS.error(f"[ASYNC] Error: {str(e)}")
72
+ return None
73
+
74
+ async def send_message(self, model: str = None, params: QueryParameter = None, list_key=False):
35
75
  model_dict = {
36
76
  "hybrid": "AkenoX-1.9-Hybrid",
37
77
  "melayu": "lu-melayu",
@@ -43,6 +83,12 @@ class RyzenthXAsync:
43
83
  "lirikend": "lirik-end",
44
84
  "alsholawat": "al-sholawat"
45
85
  }
86
+ if list_key:
87
+ return list(model_dict.keys())
88
+
89
+ if not model:
90
+ raise ValueError("`model` is required. Use `list_key=True` to see all valid options.")
91
+
46
92
  model_param = model_dict.get(model)
47
93
  if not model_param:
48
94
  raise ValueError(f"Invalid model name: {model}")
Ryzenth/_synchisded.py CHANGED
@@ -31,7 +31,45 @@ class RyzenthXSync:
31
31
  self.base_url = base_url.rstrip("/")
32
32
  self.headers = {"x-api-key": self.api_key}
33
33
 
34
- def send_message(self, model: str, params: QueryParameter):
34
+ def send_downloader(self, switch_name: str = None, params: QueryParameter = None, list_key=False):
35
+ dl_dict = {
36
+ "teraboxv4": "terabox-v4",
37
+ "twitterv3": "twitter-v3",
38
+ "xnxxinfov2": "xnxx-info-v2",
39
+ "instagramv4": "instagram-v4",
40
+ "instagramv3": "instagram-v3",
41
+ "instagramv2": "instagram-v2",
42
+ "instagram": "instagram",
43
+ "twitter": "twitter",
44
+ "tiktok": "tiktok",
45
+ "tiktokv2": "tiktok-v2",
46
+ "facebook": "fb",
47
+ "snapsave": "snapsave",
48
+ "savefrom": "savefrom"
49
+ }
50
+ if list_key:
51
+ return list(dl_dict.keys())
52
+
53
+ if not switch_name:
54
+ raise ValueError("`switch_name` is required. Use `list_key=True` to see all valid options.")
55
+
56
+ model_name = dl_dict.get(switch_name)
57
+ if not model_name:
58
+ raise ValueError(f"Invalid switch_name: {switch_name}")
59
+ try:
60
+ response = httpx.get(
61
+ f"{self.base_url}/v1/dl/{model_name}",
62
+ params=params.dict(),
63
+ headers=self.headers,
64
+ timeout=10
65
+ )
66
+ response.raise_for_status()
67
+ return response.json()
68
+ except httpx.HTTPError as e:
69
+ LOGS.error(f"[SYNC] Error fetching from downloader {e}")
70
+ return None
71
+
72
+ def send_message(self, model: str = None, params: QueryParameter = None, list_key=False):
35
73
  model_dict = {
36
74
  "hybrid": "AkenoX-1.9-Hybrid",
37
75
  "melayu": "lu-melayu",
@@ -43,6 +81,12 @@ class RyzenthXSync:
43
81
  "lirikend": "lirik-end",
44
82
  "alsholawat": "al-sholawat"
45
83
  }
84
+ if list_key:
85
+ return list(model_dict.keys())
86
+
87
+ if not model:
88
+ raise ValueError("`model` is required. Use `list_key=True` to see all valid options.")
89
+
46
90
  model_param = model_dict.get(model)
47
91
  if not model_param:
48
92
  raise ValueError(f"Invalid model name: {model}")
@@ -57,5 +101,5 @@ class RyzenthXSync:
57
101
  response.raise_for_status()
58
102
  return response.json()
59
103
  except httpx.HTTPError as e:
60
- LOGS.error(f"[SYNC] Error fetching from model '{model_param}': {e}")
104
+ LOGS.error(f"[SYNC] Error fetching from akenox: {e}")
61
105
  return None
Ryzenth/types/__init__.py CHANGED
@@ -18,10 +18,11 @@
18
18
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
 
21
- from typing import Optional
21
+ from typing import Any, Optional
22
22
 
23
23
  from pydantic import BaseModel
24
24
 
25
25
 
26
26
  class QueryParameter(BaseModel):
27
- query: str
27
+ query: Optional[str] = None
28
+ url: Optional[str] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Ryzenth
3
- Version: 1.8.2
3
+ Version: 1.8.3
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -79,9 +79,9 @@ pip install ryzenth[fast]
79
79
  from Ryzenth import ApiKeyFrom
80
80
  from Ryzenth.types import QueryParameter
81
81
 
82
- ryz = ApiKeyFrom("akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC")
82
+ ryz = ApiKeyFrom("your-api-key")
83
83
 
84
- ok = await ryz.aio.send_message(
84
+ await ryz.aio.send_message(
85
85
  "hybrid",
86
86
  QueryParameter(
87
87
  query="hello world!"
@@ -0,0 +1,11 @@
1
+ Ryzenth/__init__.py,sha256=-_DvsIrYN1rtnUJzhhgRjdCspuD26jh_AbQBtDkmoyo,944
2
+ Ryzenth/__version__.py,sha256=If0AyuBSroe8Pv0wRejh5VqDLnuaW4c2SDdS63OqUEM,118
3
+ Ryzenth/_asynchisded.py,sha256=JxNw0lAmzhnWh2WjeKPHETu6N8MorJv3rdEfWai8zxg,3989
4
+ Ryzenth/_synchisded.py,sha256=kLKL9b5dyMt_j5ew4Of5Y5hkFSDvmA43XjnmjT2Iab0,3797
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.3.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
8
+ ryzenth-1.8.3.dist-info/METADATA,sha256=eYxGY-jCsrG4xQQ0g3QBFE-RoyOK1ppfcXz0DMofWME,3262
9
+ ryzenth-1.8.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
10
+ ryzenth-1.8.3.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
11
+ ryzenth-1.8.3.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- Ryzenth/__init__.py,sha256=-_DvsIrYN1rtnUJzhhgRjdCspuD26jh_AbQBtDkmoyo,944
2
- Ryzenth/__version__.py,sha256=nuXh4zeKc0SG9XKYzgVp26tL3QzX62rLChGPYS1gOnE,118
3
- Ryzenth/_asynchisded.py,sha256=nkc3mdQur3akrZUZ0Tbc5l8eBlhztip1rutm51Cd8ck,2292
4
- Ryzenth/_synchisded.py,sha256=xn0qEMQycXcRucKB6Q0ddIFqkoFm79P8wCtzGVlcHbw,2209
5
- Ryzenth/ryzenth_client.py,sha256=fN_0BcK0ao6-CTpe5bRCT9jQD7Krr_Q8-Xlf-aFqdZY,1225
6
- Ryzenth/types/__init__.py,sha256=avUo1Ya13w7m42Uf-jtWo_4iBquUPF7MbP9XXmSBJog,933
7
- ryzenth-1.8.2.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
8
- ryzenth-1.8.2.dist-info/METADATA,sha256=3c1wAYr9Zc710FVHyLx-iE7j5vP4M37-MXX6ASsIHr0,3292
9
- ryzenth-1.8.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
10
- ryzenth-1.8.2.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
11
- ryzenth-1.8.2.dist-info/RECORD,,