Ryzenth 1.8.9__py3-none-any.whl → 1.9.1__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.9"
1
+ __version__ = "1.9.1"
2
2
  __author__ = "TeamKillerX"
3
3
  __title__ = "Ryzenth"
4
4
  __description__ = "Ryzenth Python API Wrapper"
Ryzenth/_asynchisded.py CHANGED
@@ -23,7 +23,14 @@ import httpx
23
23
  from box import Box
24
24
 
25
25
  from Ryzenth._errors import WhatFuckError
26
- from Ryzenth.helper import FbanAsync, ImagesAsync, ModeratorAsync, WhatAsync, WhisperAsync
26
+ from Ryzenth.helper import (
27
+ FbanAsync,
28
+ FontsAsync,
29
+ ImagesAsync,
30
+ ModeratorAsync,
31
+ WhatAsync,
32
+ WhisperAsync,
33
+ )
27
34
  from Ryzenth.types import DownloaderBy, QueryParameter
28
35
 
29
36
  LOGS = logging.getLogger("[Ryzenth] async")
@@ -34,11 +41,13 @@ class RyzenthXAsync:
34
41
  self.base_url = base_url.rstrip("/")
35
42
  self.headers = {"x-api-key": self.api_key}
36
43
  self.timeout = 10
44
+ self.params = {}
37
45
  self.images = ImagesAsync(self)
38
46
  self.what = WhatAsync(self)
39
47
  self.openai_audio = WhisperAsync(self)
40
48
  self.federation = FbanAsync(self)
41
49
  self.moderator = ModeratorAsync(self)
50
+ self.fonts = FontsAsync(self)
42
51
  self.obj = Box
43
52
 
44
53
  async def send_downloader(
Ryzenth/_errors.py CHANGED
@@ -1,6 +1,44 @@
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 json
21
+
22
+
1
23
  class WhatFuckError(Exception):
2
24
  pass
3
25
 
26
+ class ParamsRequiredError(ValueError):
27
+ pass
28
+
29
+ class InvalidVersionError(ValueError):
30
+ pass
31
+
32
+ class InvalidJSONDecodeError(json.decoder.JSONDecodeError):
33
+ pass
34
+
35
+ class InvalidEmptyError(ValueError):
36
+ pass
37
+
4
38
  __all__ = [
5
- "WhatFuckError"
39
+ "WhatFuckError",
40
+ "ParamsRequiredError",
41
+ "InvalidVersionError",
42
+ "InvalidJSONDecodeError",
43
+ "InvalidEmptyError"
6
44
  ]
Ryzenth/_synchisded.py CHANGED
@@ -23,7 +23,7 @@ import httpx
23
23
  from box import Box
24
24
 
25
25
  from Ryzenth._errors import WhatFuckError
26
- from Ryzenth.helper import FbanSync, ImagesSync, ModeratorSync, WhatSync, WhisperSync
26
+ from Ryzenth.helper import FbanSync, FontsSync, ImagesSync, ModeratorSync, WhatSync, WhisperSync
27
27
  from Ryzenth.types import DownloaderBy, QueryParameter
28
28
 
29
29
  LOGS = logging.getLogger("[Ryzenth] sync")
@@ -34,11 +34,13 @@ class RyzenthXSync:
34
34
  self.base_url = base_url.rstrip("/")
35
35
  self.headers = {"x-api-key": self.api_key}
36
36
  self.timeout = 10
37
+ self.params = {}
37
38
  self.images = ImagesSync(self)
38
39
  self.what = WhatSync(self)
39
40
  self.openai_audio = WhisperSync(self)
40
41
  self.federation = FbanSync(self)
41
42
  self.moderator = ModeratorSync(self)
43
+ self.fonts = FontsSync(self)
42
44
  self.obj = Box
43
45
 
44
46
  def send_downloader(
@@ -18,6 +18,7 @@
18
18
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
  from ._federation import FbanAsync, FbanSync
21
+ from ._fonts import FontsAsync, FontsSync
21
22
  from ._images import ImagesAsync, ImagesSync
22
23
  from ._moderator import ModeratorAsync, ModeratorSync
23
24
  from ._openai import WhisperAsync, WhisperSync
@@ -34,4 +35,6 @@ __all__ = [
34
35
  "FbanSync",
35
36
  "ModeratorAsync",
36
37
  "ModeratorSync",
38
+ "FontsAsync",
39
+ "FontsSync"
37
40
  ]
@@ -0,0 +1,83 @@
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 json
21
+ import logging
22
+ from datetime import datetime as dt
23
+
24
+ import httpx
25
+
26
+ from Ryzenth._errors import ParamsRequiredError, WhatFuckError
27
+
28
+ LOGS = logging.getLogger("[Ryzenth]")
29
+
30
+ class FontsAsync:
31
+ def __init__(self, parent):
32
+ self.parent = parent
33
+
34
+ async def scanning(
35
+ self,
36
+ text: str = "𝖍𝖊𝖑𝖑𝖔 𝖘𝖎𝖒𝖇𝖔𝖑",
37
+ use_parent_params_dict=False,
38
+ dot_access=False
39
+ ):
40
+ url = f"{self.parent.base_url}/v1/fonts-stylish/detected"
41
+ if not text:
42
+ raise ParamsRequiredError("Invalid Params Text")
43
+ _params = self.parent.params if use_parent_params_dict else {"query": text}
44
+ async with httpx.AsyncClient() as client:
45
+ try:
46
+ response = await client.get(
47
+ url,
48
+ params=_params,
49
+ headers=self.parent.headers,
50
+ timeout=self.parent.timeout
51
+ )
52
+ response.raise_for_status()
53
+ return self.parent.obj(response.json() or {}) if dot_access else response.json()
54
+ except httpx.HTTPError as e:
55
+ LOGS.error(f"[ASYNC] Error: {str(e)}")
56
+ raise WhatFuckError("[ASYNC] Error fetching") from e
57
+
58
+ class FontsSync:
59
+ def __init__(self, parent):
60
+ self.parent = parent
61
+
62
+ def scanning(
63
+ self,
64
+ text: str = "𝖍𝖊𝖑𝖑𝖔 𝖘𝖎𝖒𝖇𝖔𝖑",
65
+ use_parent_params_dict=False
66
+ dot_access=False
67
+ ):
68
+ url = f"{self.parent.base_url}/v1/fonts-stylish/detected"
69
+ if not text:
70
+ raise ParamsRequiredError("Invalid Params Text")
71
+ _params = self.parent.params if use_parent_params_dict else {"query": text}
72
+ try:
73
+ response = httpx.get(
74
+ url,
75
+ params=_params,
76
+ headers=self.parent.headers,
77
+ timeout=self.parent.timeout
78
+ )
79
+ response.raise_for_status()
80
+ return self.parent.obj(response.json() or {}) if dot_access else response.json()
81
+ except httpx.HTTPError as e:
82
+ LOGS.error(f"[SYNC] Error fetching from fonts {e}")
83
+ raise WhatFuckError("[SYNC] Error fetching from fonts") from e
@@ -23,7 +23,7 @@ from datetime import datetime as dt
23
23
 
24
24
  import httpx
25
25
 
26
- from Ryzenth._errors import WhatFuckError
26
+ from Ryzenth._errors import InvalidEmptyError, InvalidVersionError, WhatFuckError
27
27
 
28
28
  LOGS = logging.getLogger("[Ryzenth]")
29
29
 
@@ -33,9 +33,9 @@ class ModeratorAsync:
33
33
 
34
34
  async def antievalai(
35
35
  self,
36
- query: str,
37
- version: str,
38
- to_dict_by_loads=False,
36
+ query: str = "jasa hack",
37
+ version: str = "v2",
38
+ use_parent_params_dict=False,
39
39
  dot_access=False
40
40
  ):
41
41
  version_params = {
@@ -44,33 +44,21 @@ class ModeratorAsync:
44
44
  }
45
45
  _version = version_params.get(version)
46
46
  if not _version:
47
- raise ValueError("Invalid Version Name")
47
+ raise InvalidVersionError("Invalid Version V1 or V2")
48
+ if not query.strip():
49
+ raise InvalidEmptyError("Cannot Empty")
48
50
 
49
51
  url = f"{self.parent.base_url}/v1/ai/akenox/antievalai-{_version}"
52
+ _params = self.parent.params if use_parent_params_dict else {"query": query}
50
53
  async with httpx.AsyncClient() as client:
51
54
  try:
52
55
  response = await client.get(
53
56
  url,
54
- params={"query": query},
57
+ params=_params,
55
58
  headers=self.parent.headers,
56
59
  timeout=self.parent.timeout
57
60
  )
58
61
  response.raise_for_status()
59
- if to_dict_by_loads:
60
- try:
61
- return {
62
- "author": "TeamKillerX",
63
- f"timestamps": dt.now(),
64
- f"is_detect": json.loads(response.json()["results"])["is_detect"],
65
- "source": "Powered by Ryzenth API"
66
- }
67
- except json.decoder.JSONDecodeError:
68
- return {
69
- "author": "TeamKillerX",
70
- f"timestamps": dt.now(),
71
- f"is_detect": False,
72
- "source": "Powered by Ryzenth API"
73
- }
74
62
  return self.parent.obj(response.json() or {}) if dot_access else response.json()
75
63
  except httpx.HTTPError as e:
76
64
  LOGS.error(f"[ASYNC] Error: {str(e)}")
@@ -82,9 +70,9 @@ class ModeratorSync:
82
70
 
83
71
  def antievalai(
84
72
  self,
85
- query: str,
86
- version: str,
87
- to_dict_by_loads=False,
73
+ query: str = "jasa hack",
74
+ version: str = "v2",
75
+ use_parent_params_dict=False,
88
76
  dot_access=False
89
77
  ):
90
78
  version_params = {
@@ -93,32 +81,20 @@ class ModeratorSync:
93
81
  }
94
82
  _version = version_params.get(version)
95
83
  if not _version:
96
- raise ValueError("Invalid Version Name")
84
+ raise InvalidVersionError("Invalid Version V1 or V2")
85
+ if not query.strip():
86
+ raise InvalidEmptyError("Cannot Empty")
97
87
 
98
88
  url = f"{self.parent.base_url}/v1/ai/akenox/antievalai-{_version}"
89
+ _params = self.parent.params if use_parent_params_dict else {"query": query}
99
90
  try:
100
91
  response = httpx.get(
101
92
  url,
102
- params={"query": query},
93
+ params=_params,
103
94
  headers=self.parent.headers,
104
95
  timeout=self.parent.timeout
105
96
  )
106
97
  response.raise_for_status()
107
- if to_dict_by_loads:
108
- try:
109
- return {
110
- "author": "TeamKillerX",
111
- f"timestamps": dt.now(),
112
- f"is_detect": json.loads(response.json()["results"])["is_detect"],
113
- "source": "Powered by Ryzenth API"
114
- }
115
- except json.decoder.JSONDecodeError:
116
- return {
117
- "author": "TeamKillerX",
118
- f"timestamps": dt.now(),
119
- f"is_detect": False,
120
- "source": "Powered by Ryzenth API"
121
- }
122
98
  return self.parent.obj(response.json() or {}) if dot_access else response.json()
123
99
  except httpx.HTTPError as e:
124
100
  LOGS.error(f"[SYNC] Error fetching from antievalai {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Ryzenth
3
- Version: 1.8.9
3
+ Version: 1.9.1
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -0,0 +1,19 @@
1
+ Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
2
+ Ryzenth/__version__.py,sha256=gJVe6mBbiQm5UvBivoVVVAULV7ymWvfmSvVrUcE6z-g,118
3
+ Ryzenth/_asynchisded.py,sha256=ZNLp1rOJ_4SYcyMeB02ybsSmU38GO0TpHsQHRiR2w6c,4909
4
+ Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
5
+ Ryzenth/_errors.py,sha256=PYHmA3xZPZnH8T1Yo0Al6ln2FP8KC9Jk3eN631ve2S4,1236
6
+ Ryzenth/_synchisded.py,sha256=KFO3Smy3qKhOPW9cVQ6uutspDZjiZz79hiLaXFgGRfA,4702
7
+ Ryzenth/helper/__init__.py,sha256=ANx8vCXJ9ReLXIDWUwyhrIbw7jIyUXMdP11qotrWWIE,1308
8
+ Ryzenth/helper/_federation.py,sha256=VM1mkuPj4SvlO-VcazIV0T5Ga56RdcpDo7qybXwFCow,13946
9
+ Ryzenth/helper/_fonts.py,sha256=GZLKC5lSwiW1gNgTuq3nPTwNGC90fMqsT56e69c9J8o,3080
10
+ Ryzenth/helper/_images.py,sha256=AfNQoxae-yI76PDUa-jx7tWBlJa4tRZQFDjeqBLKwVM,2309
11
+ Ryzenth/helper/_moderator.py,sha256=dcwaHQf_aHxyZXCSNLOOJpU3-0ivvWoIHXrKyZViomU,3576
12
+ Ryzenth/helper/_openai.py,sha256=hUhmwxuKV-AAeEbDFm4RnkasHNJjFROLdw1q2j2t_Mc,2574
13
+ Ryzenth/helper/_thinking.py,sha256=BKHvQe16KPOGh7_vev-_Ed8jl6_77_8Ys-g0SDtvlSU,2557
14
+ Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
15
+ ryzenth-1.9.1.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
16
+ ryzenth-1.9.1.dist-info/METADATA,sha256=Xmxzu0brXFEG8-UkVbghb13XCeELIaewDf9SinvFxQU,4181
17
+ ryzenth-1.9.1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
18
+ ryzenth-1.9.1.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
19
+ ryzenth-1.9.1.dist-info/RECORD,,
@@ -1,18 +0,0 @@
1
- Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
2
- Ryzenth/__version__.py,sha256=jPL75PTvp1TZbA0hDnWqpwC1hH1KuW3f2wqQZbVZgNM,118
3
- Ryzenth/_asynchisded.py,sha256=pSbv0xKGrJ7oOupMP8fDS6TvWVnkwAc0ILaTOycy6So,4805
4
- Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
5
- Ryzenth/_errors.py,sha256=6JwvEAz7SHfJ_6-DkXzwyC5GrdzGr6FtbcIkaRYo9OQ,74
6
- Ryzenth/_synchisded.py,sha256=LERIcwOWckaF2Tsae0wfjtgHe_yC41rCk1I08AVFpqY,4629
7
- Ryzenth/helper/__init__.py,sha256=tmJJan2ZVtEy-GHxGwTWuYrP9iYugRuGLjQVnTApZU8,1236
8
- Ryzenth/helper/_federation.py,sha256=VM1mkuPj4SvlO-VcazIV0T5Ga56RdcpDo7qybXwFCow,13946
9
- Ryzenth/helper/_images.py,sha256=AfNQoxae-yI76PDUa-jx7tWBlJa4tRZQFDjeqBLKwVM,2309
10
- Ryzenth/helper/_moderator.py,sha256=BCZ97DntbMaPmKKWZOPf0W9GjcxzwM2y1N9PqgRPT2w,4518
11
- Ryzenth/helper/_openai.py,sha256=hUhmwxuKV-AAeEbDFm4RnkasHNJjFROLdw1q2j2t_Mc,2574
12
- Ryzenth/helper/_thinking.py,sha256=BKHvQe16KPOGh7_vev-_Ed8jl6_77_8Ys-g0SDtvlSU,2557
13
- Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
14
- ryzenth-1.8.9.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
15
- ryzenth-1.8.9.dist-info/METADATA,sha256=KZsmokursAmjhKiAl69cntqWRo3QzDotDEoLAcreJdU,4181
16
- ryzenth-1.8.9.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
17
- ryzenth-1.8.9.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
18
- ryzenth-1.8.9.dist-info/RECORD,,