Ryzenth 1.8.9__py3-none-any.whl → 1.9.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 +10 -1
- Ryzenth/_errors.py +5 -1
- Ryzenth/_synchisded.py +3 -1
- Ryzenth/helper/__init__.py +3 -0
- Ryzenth/helper/_fonts.py +79 -0
- {ryzenth-1.8.9.dist-info → ryzenth-1.9.0.dist-info}/METADATA +1 -1
- ryzenth-1.9.0.dist-info/RECORD +19 -0
- ryzenth-1.8.9.dist-info/RECORD +0 -18
- {ryzenth-1.8.9.dist-info → ryzenth-1.9.0.dist-info}/WHEEL +0 -0
- {ryzenth-1.8.9.dist-info → ryzenth-1.9.0.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.8.9.dist-info → ryzenth-1.9.0.dist-info}/top_level.txt +0 -0
Ryzenth/__version__.py
CHANGED
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
|
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
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(
|
Ryzenth/helper/__init__.py
CHANGED
@@ -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
|
]
|
Ryzenth/helper/_fonts.py
ADDED
@@ -0,0 +1,79 @@
|
|
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 ErrorParamsRequired, 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 = None,
|
37
|
+
dot_access=False
|
38
|
+
):
|
39
|
+
url = f"{self.parent.base_url}/v1/fonts-stylish/detected"
|
40
|
+
if not text:
|
41
|
+
raise ErrorParamsRequired("Invalid Params Text")
|
42
|
+
async with httpx.AsyncClient() as client:
|
43
|
+
try:
|
44
|
+
response = await client.get(
|
45
|
+
url,
|
46
|
+
params={"query": text},
|
47
|
+
headers=self.parent.headers,
|
48
|
+
timeout=self.parent.timeout
|
49
|
+
)
|
50
|
+
response.raise_for_status()
|
51
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
52
|
+
except httpx.HTTPError as e:
|
53
|
+
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
54
|
+
raise WhatFuckError("[ASYNC] Error fetching") from e
|
55
|
+
|
56
|
+
class FontsSync:
|
57
|
+
def __init__(self, parent):
|
58
|
+
self.parent = parent
|
59
|
+
|
60
|
+
def scanning(
|
61
|
+
self,
|
62
|
+
text: str = None,
|
63
|
+
dot_access=False
|
64
|
+
):
|
65
|
+
url = f"{self.parent.base_url}/v1/fonts-stylish/detected"
|
66
|
+
if not text:
|
67
|
+
raise ErrorParamsRequired("Invalid Params Text")
|
68
|
+
try:
|
69
|
+
response = httpx.get(
|
70
|
+
url,
|
71
|
+
params={"query": text},
|
72
|
+
headers=self.parent.headers,
|
73
|
+
timeout=self.parent.timeout
|
74
|
+
)
|
75
|
+
response.raise_for_status()
|
76
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
77
|
+
except httpx.HTTPError as e:
|
78
|
+
LOGS.error(f"[SYNC] Error fetching from fonts {e}")
|
79
|
+
raise WhatFuckError("[SYNC] Error fetching from fonts") from e
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
|
2
|
+
Ryzenth/__version__.py,sha256=twdc5C08GfAEZJ_2vw8Vu9ivAX2v2en0u5F_RcOWe_w,118
|
3
|
+
Ryzenth/_asynchisded.py,sha256=ZNLp1rOJ_4SYcyMeB02ybsSmU38GO0TpHsQHRiR2w6c,4909
|
4
|
+
Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
|
5
|
+
Ryzenth/_errors.py,sha256=_ViAlLpyKIEM5b2NQHNw8ftAvm80g7Rrv1QHWNAQ5LI,152
|
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=jrZ_wTZiXuN8AbqrT8bqc09naEkEJqQ8AdA16e_rqlk,2767
|
10
|
+
Ryzenth/helper/_images.py,sha256=AfNQoxae-yI76PDUa-jx7tWBlJa4tRZQFDjeqBLKwVM,2309
|
11
|
+
Ryzenth/helper/_moderator.py,sha256=BCZ97DntbMaPmKKWZOPf0W9GjcxzwM2y1N9PqgRPT2w,4518
|
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.0.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
16
|
+
ryzenth-1.9.0.dist-info/METADATA,sha256=01OPOveR6quHQidtFmdMvKCX-V2Ii0vFOM-Z8MvpZWU,4181
|
17
|
+
ryzenth-1.9.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
18
|
+
ryzenth-1.9.0.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
19
|
+
ryzenth-1.9.0.dist-info/RECORD,,
|
ryzenth-1.8.9.dist-info/RECORD
DELETED
@@ -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,,
|
File without changes
|
File without changes
|
File without changes
|