Ryzenth 1.8.1__tar.gz → 1.8.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Ryzenth
3
- Version: 1.8.1
3
+ Version: 1.8.3
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -54,7 +54,7 @@ Dynamic: summary
54
54
 
55
55
  # Ryzenth Library
56
56
 
57
- **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.
57
+ **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
58
 
59
59
  > Note: AkenoX API is still alive and supported, but Ryzenth is the next generation.
60
60
 
@@ -68,7 +68,7 @@ Dynamic: summary
68
68
  ## Installation
69
69
 
70
70
  ```bash
71
- pip install ryzenth
71
+ pip install ryzenth[fast]
72
72
  ````
73
73
 
74
74
  ## Getting Started
@@ -77,21 +77,35 @@ pip install ryzenth
77
77
 
78
78
  ```python
79
79
  from Ryzenth import ApiKeyFrom
80
+ from Ryzenth.types import QueryParameter
80
81
 
81
82
  ryz = ApiKeyFrom("your-api-key")
82
- await ryz.aio.send_message_hybrid("Hello from Ryzenth!")
83
+
84
+ await ryz.aio.send_message(
85
+ "hybrid",
86
+ QueryParameter(
87
+ query="hello world!"
88
+ )
89
+ )
83
90
  ```
84
91
 
85
92
  ### Sync Example
86
93
 
87
94
  ```python
88
95
  from Ryzenth import ApiKeyFrom
96
+ from Ryzenth.types import QueryParameter
89
97
 
90
98
  ryz = ApiKeyFrom("your-api-key")
91
- ryz._sync.send_message_hybrid("Hello from Ryzenth (sync)!")
99
+ ryz._sync.send_message(
100
+ "hybrid",
101
+ QueryParameter(
102
+ query="hello world!"
103
+ )
104
+ )
92
105
  ```
93
106
 
94
107
  ## Environment Variable Support
108
+ - Available API key v2 via [`@aknuserbot`](https://t.me/aknuserbot)
95
109
 
96
110
  You can skip passing the API key directly by setting it via environment:
97
111
 
@@ -1,6 +1,6 @@
1
1
  # Ryzenth Library
2
2
 
3
- **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.
3
+ **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.
4
4
 
5
5
  > Note: AkenoX API is still alive and supported, but Ryzenth is the next generation.
6
6
 
@@ -14,7 +14,7 @@
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- pip install ryzenth
17
+ pip install ryzenth[fast]
18
18
  ````
19
19
 
20
20
  ## Getting Started
@@ -23,21 +23,35 @@ pip install ryzenth
23
23
 
24
24
  ```python
25
25
  from Ryzenth import ApiKeyFrom
26
+ from Ryzenth.types import QueryParameter
26
27
 
27
28
  ryz = ApiKeyFrom("your-api-key")
28
- await ryz.aio.send_message_hybrid("Hello from Ryzenth!")
29
+
30
+ await ryz.aio.send_message(
31
+ "hybrid",
32
+ QueryParameter(
33
+ query="hello world!"
34
+ )
35
+ )
29
36
  ```
30
37
 
31
38
  ### Sync Example
32
39
 
33
40
  ```python
34
41
  from Ryzenth import ApiKeyFrom
42
+ from Ryzenth.types import QueryParameter
35
43
 
36
44
  ryz = ApiKeyFrom("your-api-key")
37
- ryz._sync.send_message_hybrid("Hello from Ryzenth (sync)!")
45
+ ryz._sync.send_message(
46
+ "hybrid",
47
+ QueryParameter(
48
+ query="hello world!"
49
+ )
50
+ )
38
51
  ```
39
52
 
40
53
  ## Environment Variable Support
54
+ - Available API key v2 via [`@aknuserbot`](https://t.me/aknuserbot)
41
55
 
42
56
  You can skip passing the API key directly by setting it via environment:
43
57
 
@@ -1,4 +1,4 @@
1
- __version__ = "1.8.1"
1
+ __version__ = "1.8.3"
2
2
  __author__ = "TeamKillerX"
3
3
  __title__ = "Ryzenth"
4
4
  __description__ = "Ryzenth Python API Wrapper"
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # Copyright 2019-2025 (c) Randy W @xtdevs, @xtsea
4
+ #
5
+ # from : https://github.com/TeamKillerX
6
+ # Channel : @RendyProjects
7
+ # This program is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Affero General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Affero General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Affero General Public License
18
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+
20
+ import logging
21
+
22
+ import httpx
23
+
24
+ from Ryzenth.types import QueryParameter
25
+
26
+ LOGS = logging.getLogger("[Ryzenth] async")
27
+
28
+ class RyzenthXAsync:
29
+ def __init__(self, api_key: str, base_url: str = "https://randydev-ryu-js.hf.space/api"):
30
+ self.api_key = api_key
31
+ self.base_url = base_url.rstrip("/")
32
+ self.headers = {"x-api-key": self.api_key}
33
+
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):
75
+ model_dict = {
76
+ "hybrid": "AkenoX-1.9-Hybrid",
77
+ "melayu": "lu-melayu",
78
+ "nocodefou": "nocodefou",
79
+ "mia": "mia-khalifah",
80
+ "curlmcode": "curl-command-code",
81
+ "quotessad": "quotes-sad",
82
+ "quoteslucu": "quotes-lucu",
83
+ "lirikend": "lirik-end",
84
+ "alsholawat": "al-sholawat"
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
+
92
+ model_param = model_dict.get(model)
93
+ if not model_param:
94
+ raise ValueError(f"Invalid model name: {model}")
95
+
96
+ async with httpx.AsyncClient() as client:
97
+ try:
98
+ response = await client.get(
99
+ f"{self.base_url}/v1/ai/akenox/{model_param}",
100
+ params=params.dict(),
101
+ headers=self.headers,
102
+ timeout=10
103
+ )
104
+ response.raise_for_status()
105
+ return response.json()
106
+ except httpx.HTTPError as e:
107
+ LOGS.error(f"[ASYNC] Error: {str(e)}")
108
+ return None
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # Copyright 2019-2025 (c) Randy W @xtdevs, @xtsea
4
+ #
5
+ # from : https://github.com/TeamKillerX
6
+ # Channel : @RendyProjects
7
+ # This program is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Affero General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Affero General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Affero General Public License
18
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+
20
+ import logging
21
+
22
+ import httpx
23
+
24
+ from Ryzenth.types import QueryParameter
25
+
26
+ LOGS = logging.getLogger("[Ryzenth] sync")
27
+
28
+ class RyzenthXSync:
29
+ def __init__(self, api_key: str, base_url: str = "https://randydev-ryu-js.hf.space/api"):
30
+ self.api_key = api_key
31
+ self.base_url = base_url.rstrip("/")
32
+ self.headers = {"x-api-key": self.api_key}
33
+
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):
73
+ model_dict = {
74
+ "hybrid": "AkenoX-1.9-Hybrid",
75
+ "melayu": "lu-melayu",
76
+ "nocodefou": "nocodefou",
77
+ "mia": "mia-khalifah",
78
+ "curlmcode": "curl-command-code",
79
+ "quotessad": "quotes-sad",
80
+ "quoteslucu": "quotes-lucu",
81
+ "lirikend": "lirik-end",
82
+ "alsholawat": "al-sholawat"
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
+
90
+ model_param = model_dict.get(model)
91
+ if not model_param:
92
+ raise ValueError(f"Invalid model name: {model}")
93
+
94
+ try:
95
+ response = httpx.get(
96
+ f"{self.base_url}/v1/ai/akenox/{model_param}",
97
+ params=params.dict(),
98
+ headers=self.headers,
99
+ timeout=10
100
+ )
101
+ response.raise_for_status()
102
+ return response.json()
103
+ except httpx.HTTPError as e:
104
+ LOGS.error(f"[SYNC] Error fetching from akenox: {e}")
105
+ return None
@@ -19,8 +19,9 @@
19
19
 
20
20
  import os
21
21
 
22
- from Ryzenth._synchisded import RyzenthXSync
23
22
  from Ryzenth._asynchisded import RyzenthXAsync
23
+ from Ryzenth._synchisded import RyzenthXSync
24
+
24
25
 
25
26
  class ApiKeyFrom:
26
27
  def __init__(self, api_key: str = None):
@@ -18,9 +18,11 @@
18
18
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
 
21
+ from typing import Any, Optional
22
+
21
23
  from pydantic import BaseModel
22
- from typing import Optional
23
24
 
24
- class HybridParams(BaseModel):
25
- query: str
26
-
25
+
26
+ class QueryParameter(BaseModel):
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.1
3
+ Version: 1.8.3
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -54,7 +54,7 @@ Dynamic: summary
54
54
 
55
55
  # Ryzenth Library
56
56
 
57
- **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.
57
+ **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
58
 
59
59
  > Note: AkenoX API is still alive and supported, but Ryzenth is the next generation.
60
60
 
@@ -68,7 +68,7 @@ Dynamic: summary
68
68
  ## Installation
69
69
 
70
70
  ```bash
71
- pip install ryzenth
71
+ pip install ryzenth[fast]
72
72
  ````
73
73
 
74
74
  ## Getting Started
@@ -77,21 +77,35 @@ pip install ryzenth
77
77
 
78
78
  ```python
79
79
  from Ryzenth import ApiKeyFrom
80
+ from Ryzenth.types import QueryParameter
80
81
 
81
82
  ryz = ApiKeyFrom("your-api-key")
82
- await ryz.aio.send_message_hybrid("Hello from Ryzenth!")
83
+
84
+ await ryz.aio.send_message(
85
+ "hybrid",
86
+ QueryParameter(
87
+ query="hello world!"
88
+ )
89
+ )
83
90
  ```
84
91
 
85
92
  ### Sync Example
86
93
 
87
94
  ```python
88
95
  from Ryzenth import ApiKeyFrom
96
+ from Ryzenth.types import QueryParameter
89
97
 
90
98
  ryz = ApiKeyFrom("your-api-key")
91
- ryz._sync.send_message_hybrid("Hello from Ryzenth (sync)!")
99
+ ryz._sync.send_message(
100
+ "hybrid",
101
+ QueryParameter(
102
+ query="hello world!"
103
+ )
104
+ )
92
105
  ```
93
106
 
94
107
  ## Environment Variable Support
108
+ - Available API key v2 via [`@aknuserbot`](https://t.me/aknuserbot)
95
109
 
96
110
  You can skip passing the API key directly by setting it via environment:
97
111
 
@@ -3,6 +3,7 @@ import re
3
3
 
4
4
  import setuptools
5
5
 
6
+
6
7
  def read(fname, version=False):
7
8
  text = open(os.path.join(os.path.dirname(__file__), fname), encoding="utf8").read()
8
9
  return re.search(r'__version__ = "(.*?)"', text)[1] if version else text
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- # Copyright 2019-2025 (c) Randy W @xtdevs, @xtsea
4
- #
5
- # from : https://github.com/TeamKillerX
6
- # Channel : @RendyProjects
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU Affero General Public License as published by
9
- # the Free Software Foundation, either version 3 of the License, or
10
- # (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU Affero General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU Affero General Public License
18
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
-
20
- from Ryzenth.types import *
21
- import httpx
22
-
23
- class RyzenthXAsync:
24
- def __init__(self, api_key, base_url="https://randydev-ryu-js.hf.space/api"):
25
- self.api_key = api_key
26
- self.base_url = base_url
27
- self.headers = {"x-api-key": f"{self.api_key}"}
28
-
29
- async def send_message_hybrid(self, text: str):
30
- async with httpx.AsyncClient() as client:
31
- try:
32
- response = await client.get(
33
- f"{self.base_url}/v1/ai/akenox/AkenoX-1.9-Hybrid",
34
- params=params.dict(),
35
- headers=self.headers,
36
- timeout=10
37
- )
38
- response.raise_for_status()
39
- return response.json()
40
- except httpx.HTTPError as e:
41
- print(f"[ASYNC] Error: {e}")
42
- return None
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- # Copyright 2019-2025 (c) Randy W @xtdevs, @xtsea
4
- #
5
- # from : https://github.com/TeamKillerX
6
- # Channel : @RendyProjects
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU Affero General Public License as published by
9
- # the Free Software Foundation, either version 3 of the License, or
10
- # (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU Affero General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU Affero General Public License
18
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
-
20
- from Ryzenth.types import *
21
- import httpx
22
-
23
- class RyzenthXSync:
24
- def __init__(self, api_key, base_url="https://randydev-ryu-js.hf.space/api"):
25
- self.api_key = api_key
26
- self.base_url = base_url
27
- self.headers = {"x-api-key": f"{self.api_key}"}
28
-
29
- def send_message_hybrid(self, params: HybridParams):
30
- try:
31
- response = httpx.get(
32
- f"{self.base_url}/v1/ai/akenox/AkenoX-1.9-Hybrid",
33
- params=params.dict(),
34
- headers=self.headers,
35
- timeout=10
36
- )
37
- response.raise_for_status()
38
- return response.json()
39
- except httpx.HTTPError as e:
40
- print(f"[SYNC] Error: {e}")
41
- return None
File without changes
@@ -18,8 +18,8 @@
18
18
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
  from . import *
21
- from .ryzenth_client import ApiKeyFrom
22
21
  from .__version__ import __version__
22
+ from .ryzenth_client import ApiKeyFrom
23
23
 
24
24
  __all__ = [
25
25
  "ApiKeyFrom"
File without changes