Ryzenth 1.8.2__py3-none-any.whl → 1.8.4__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.4"
2
2
  __author__ = "TeamKillerX"
3
3
  __title__ = "Ryzenth"
4
4
  __description__ = "Ryzenth Python API Wrapper"
Ryzenth/_asynchisded.py CHANGED
@@ -30,8 +30,64 @@ class RyzenthXAsync:
30
30
  self.api_key = api_key
31
31
  self.base_url = base_url.rstrip("/")
32
32
  self.headers = {"x-api-key": self.api_key}
33
+ self.images = self.ImagesAsync(self)
33
34
 
34
- async def send_message(self, model: str, params: QueryParameter):
35
+ class ImagesAsync:
36
+ def __init__(self, parent):
37
+ self.parent = parent
38
+
39
+ async def generate(self, params: QueryParameter):
40
+ url = f"{self.parent.base_url}/v1/flux/black-forest-labs/flux-1-schnell"
41
+ async with httpx.AsyncClient() as client:
42
+ try:
43
+ response = await client.get(url, params=params.dict(), headers=self.parent.headers, timeout=30)
44
+ response.raise_for_status()
45
+ return response.content
46
+ except httpx.HTTPError as e:
47
+ LOGS.error(f"[ASYNC] Error: {str(e)}")
48
+ return None
49
+
50
+ async def send_downloader(self, switch_name: str = None, params: QueryParameter = None, list_key=False):
51
+ dl_dict = {
52
+ "teraboxv4": "terabox-v4",
53
+ "twitterv3": "twitter-v3",
54
+ "xnxxinfov2": "xnxx-info-v2",
55
+ "instagramv4": "instagram-v4",
56
+ "instagramv3": "instagram-v3",
57
+ "instagramv2": "instagram-v2",
58
+ "instagram": "instagram",
59
+ "twitter": "twitter",
60
+ "tiktok": "tiktok",
61
+ "tiktokv2": "tiktok-v2",
62
+ "facebook": "fb",
63
+ "snapsave": "snapsave",
64
+ "savefrom": "savefrom"
65
+ }
66
+ if list_key:
67
+ return list(dl_dict.keys())
68
+
69
+ if not switch_name:
70
+ raise ValueError("`switch_name` is required. Use `list_key=True` to see all valid options.")
71
+
72
+ model_name = dl_dict.get(switch_name)
73
+ if not model_name:
74
+ raise ValueError(f"Invalid switch_name: {switch_name}")
75
+
76
+ async with httpx.AsyncClient() as client:
77
+ try:
78
+ response = await client.get(
79
+ f"{self.base_url}/v1/dl/{model_name}",
80
+ params=params.dict(),
81
+ headers=self.headers,
82
+ timeout=10
83
+ )
84
+ response.raise_for_status()
85
+ return response.json()
86
+ except httpx.HTTPError as e:
87
+ LOGS.error(f"[ASYNC] Error: {str(e)}")
88
+ return None
89
+
90
+ async def send_message(self, model: str = None, params: QueryParameter = None, list_key=False):
35
91
  model_dict = {
36
92
  "hybrid": "AkenoX-1.9-Hybrid",
37
93
  "melayu": "lu-melayu",
@@ -43,6 +99,12 @@ class RyzenthXAsync:
43
99
  "lirikend": "lirik-end",
44
100
  "alsholawat": "al-sholawat"
45
101
  }
102
+ if list_key:
103
+ return list(model_dict.keys())
104
+
105
+ if not model:
106
+ raise ValueError("`model` is required. Use `list_key=True` to see all valid options.")
107
+
46
108
  model_param = model_dict.get(model)
47
109
  if not model_param:
48
110
  raise ValueError(f"Invalid model name: {model}")
Ryzenth/_synchisded.py CHANGED
@@ -30,8 +30,66 @@ class RyzenthXSync:
30
30
  self.api_key = api_key
31
31
  self.base_url = base_url.rstrip("/")
32
32
  self.headers = {"x-api-key": self.api_key}
33
+ self.images = self.ImagesSync(self)
33
34
 
34
- def send_message(self, model: str, params: QueryParameter):
35
+ class ImagesSync:
36
+ def __init__(self, parent):
37
+ self.parent = parent
38
+
39
+ def generate(self, params: QueryParameter):
40
+ url = f"{self.parent.base_url}/v1/flux/black-forest-labs/flux-1-schnell"
41
+ try:
42
+ response = httpx.get(
43
+ url,
44
+ params=params.dict(),
45
+ headers=self.parent.headers,
46
+ timeout=30
47
+ )
48
+ response.raise_for_status()
49
+ return response.content
50
+ except httpx.HTTPError as e:
51
+ LOGS.error(f"[SYNC] Error fetching from images {e}")
52
+ return None
53
+
54
+ def send_downloader(self, switch_name: str = None, params: QueryParameter = None, list_key=False):
55
+ dl_dict = {
56
+ "teraboxv4": "terabox-v4",
57
+ "twitterv3": "twitter-v3",
58
+ "xnxxinfov2": "xnxx-info-v2",
59
+ "instagramv4": "instagram-v4",
60
+ "instagramv3": "instagram-v3",
61
+ "instagramv2": "instagram-v2",
62
+ "instagram": "instagram",
63
+ "twitter": "twitter",
64
+ "tiktok": "tiktok",
65
+ "tiktokv2": "tiktok-v2",
66
+ "facebook": "fb",
67
+ "snapsave": "snapsave",
68
+ "savefrom": "savefrom"
69
+ }
70
+ if list_key:
71
+ return list(dl_dict.keys())
72
+
73
+ if not switch_name:
74
+ raise ValueError("`switch_name` is required. Use `list_key=True` to see all valid options.")
75
+
76
+ model_name = dl_dict.get(switch_name)
77
+ if not model_name:
78
+ raise ValueError(f"Invalid switch_name: {switch_name}")
79
+ try:
80
+ response = httpx.get(
81
+ f"{self.base_url}/v1/dl/{model_name}",
82
+ params=params.dict(),
83
+ headers=self.headers,
84
+ timeout=10
85
+ )
86
+ response.raise_for_status()
87
+ return response.json()
88
+ except httpx.HTTPError as e:
89
+ LOGS.error(f"[SYNC] Error fetching from downloader {e}")
90
+ return None
91
+
92
+ def send_message(self, model: str = None, params: QueryParameter = None, list_key=False):
35
93
  model_dict = {
36
94
  "hybrid": "AkenoX-1.9-Hybrid",
37
95
  "melayu": "lu-melayu",
@@ -43,6 +101,12 @@ class RyzenthXSync:
43
101
  "lirikend": "lirik-end",
44
102
  "alsholawat": "al-sholawat"
45
103
  }
104
+ if list_key:
105
+ return list(model_dict.keys())
106
+
107
+ if not model:
108
+ raise ValueError("`model` is required. Use `list_key=True` to see all valid options.")
109
+
46
110
  model_param = model_dict.get(model)
47
111
  if not model_param:
48
112
  raise ValueError(f"Invalid model name: {model}")
@@ -57,5 +121,5 @@ class RyzenthXSync:
57
121
  response.raise_for_status()
58
122
  return response.json()
59
123
  except httpx.HTTPError as e:
60
- LOGS.error(f"[SYNC] Error fetching from model '{model_param}': {e}")
124
+ LOGS.error(f"[SYNC] Error fetching from akenox: {e}")
61
125
  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.4
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -53,6 +53,13 @@ Dynamic: requires-python
53
53
  Dynamic: summary
54
54
 
55
55
  # Ryzenth Library
56
+ [![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.png?v=103)](https://github.com/TeamKillerX/Ryzenth)
57
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-Yes-green)](https://github.com/TeamKillerX/Ryzenth/graphs/commit-activity)
58
+ [![GitHub Forks](https://img.shields.io/github/forks/TeamKillerX/Ryzenth?&logo=github)](https://github.com/TeamKillerX/Ryzenth)
59
+ [![License](https://img.shields.io/badge/License-GPL-pink)](https://github.com/TeamKillerX/Ryzenth/blob/main/LICENSE)
60
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)
61
+ [![Ryzenth - Version](https://img.shields.io/pypi/v/Ryzenth?style=round)](https://pypi.org/project/Ryzenth)
62
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/TeamKillerX/Ryzenth/main.svg)](https://results.pre-commit.ci/latest/github/TeamKillerX/Ryzenth/main)
56
63
 
57
64
  **Ryzenth** is a powerful and flexible Python SDK for interacting with the new **Ryzenth API** a successor to the AkenoX API supporting both synchronous and asynchronous workflows out of the box.
58
65
 
@@ -79,9 +86,9 @@ pip install ryzenth[fast]
79
86
  from Ryzenth import ApiKeyFrom
80
87
  from Ryzenth.types import QueryParameter
81
88
 
82
- ryz = ApiKeyFrom("akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC")
89
+ ryz = ApiKeyFrom("your-api-key")
83
90
 
84
- ok = await ryz.aio.send_message(
91
+ await ryz.aio.send_message(
85
92
  "hybrid",
86
93
  QueryParameter(
87
94
  query="hello world!"
@@ -0,0 +1,11 @@
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,,
@@ -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,,