Ryzenth 1.9.5__py3-none-any.whl → 1.9.6__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/__init__.py +2 -2
- Ryzenth/__version__.py +1 -1
- Ryzenth/_asynchisded.py +2 -0
- Ryzenth/_client.py +12 -3
- Ryzenth/_synchisded.py +12 -3
- Ryzenth/helper/__init__.py +3 -0
- Ryzenth/helper/_decorators.py +1 -1
- Ryzenth/helper/_ryzenth.py +73 -0
- Ryzenth/types/__init__.py +6 -0
- {ryzenth-1.9.5.dist-info → ryzenth-1.9.6.dist-info}/METADATA +1 -1
- ryzenth-1.9.6.dist-info/RECORD +21 -0
- ryzenth-1.9.5.dist-info/RECORD +0 -20
- {ryzenth-1.9.5.dist-info → ryzenth-1.9.6.dist-info}/WHEEL +0 -0
- {ryzenth-1.9.5.dist-info → ryzenth-1.9.6.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.9.5.dist-info → ryzenth-1.9.6.dist-info}/top_level.txt +0 -0
Ryzenth/__init__.py
CHANGED
@@ -19,6 +19,6 @@
|
|
19
19
|
|
20
20
|
from . import *
|
21
21
|
from .__version__ import __version__
|
22
|
-
from ._client import ApiKeyFrom, UrHellFrom
|
22
|
+
from ._client import ApiKeyFrom, SmallConvertDot, UrHellFrom
|
23
23
|
|
24
|
-
__all__ = [ "ApiKeyFrom", "UrHellFrom"]
|
24
|
+
__all__ = [ "ApiKeyFrom", "UrHellFrom", "SmallConvertDot"]
|
Ryzenth/__version__.py
CHANGED
Ryzenth/_asynchisded.py
CHANGED
@@ -26,6 +26,7 @@ from ._errors import WhatFuckError
|
|
26
26
|
from .helper import (
|
27
27
|
FbanAsync,
|
28
28
|
FontsAsync,
|
29
|
+
HumanizeAsync,
|
29
30
|
ImagesAsync,
|
30
31
|
ModeratorAsync,
|
31
32
|
WhatAsync,
|
@@ -48,6 +49,7 @@ class RyzenthXAsync:
|
|
48
49
|
self.federation = FbanAsync(self)
|
49
50
|
self.moderator = ModeratorAsync(self)
|
50
51
|
self.fonts = FontsAsync(self)
|
52
|
+
self.humanizer = HumanizeAsync(self)
|
51
53
|
self.obj = Box
|
52
54
|
|
53
55
|
async def send_downloader(
|
Ryzenth/_client.py
CHANGED
@@ -19,22 +19,24 @@
|
|
19
19
|
|
20
20
|
import os
|
21
21
|
|
22
|
+
from box import Box
|
23
|
+
|
22
24
|
from ._asynchisded import RyzenthXAsync
|
23
25
|
from ._synchisded import RyzenthXSync
|
24
26
|
from .helper import Decorators
|
25
27
|
|
26
28
|
|
27
29
|
class ApiKeyFrom:
|
28
|
-
def __init__(self, api_key: str = None,
|
30
|
+
def __init__(self, api_key: str = None, is_ok=False):
|
29
31
|
if api_key is Ellipsis:
|
30
|
-
|
32
|
+
is_ok = True
|
31
33
|
api_key = None
|
32
34
|
|
33
35
|
if not api_key:
|
34
36
|
api_key = os.environ.get("RYZENTH_API_KEY")
|
35
37
|
|
36
38
|
if not api_key:
|
37
|
-
api_key = "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC" if
|
39
|
+
api_key = "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC" if is_ok else None
|
38
40
|
|
39
41
|
self.api_key = api_key
|
40
42
|
self.aio = RyzenthXAsync(api_key)
|
@@ -50,3 +52,10 @@ class UrHellFrom:
|
|
50
52
|
|
51
53
|
def something(self):
|
52
54
|
pass
|
55
|
+
|
56
|
+
class SmallConvertDot:
|
57
|
+
def __init__(self, obj):
|
58
|
+
self.obj = obj
|
59
|
+
|
60
|
+
def to_dot(self):
|
61
|
+
return Box(self.obj if self.obj is not None else {})
|
Ryzenth/_synchisded.py
CHANGED
@@ -22,9 +22,17 @@ import logging
|
|
22
22
|
import httpx
|
23
23
|
from box import Box
|
24
24
|
|
25
|
-
from
|
26
|
-
from
|
27
|
-
|
25
|
+
from ._errors import WhatFuckError
|
26
|
+
from .helper import (
|
27
|
+
FbanSync,
|
28
|
+
FontsSync,
|
29
|
+
HumanizeSync,
|
30
|
+
ImagesSync,
|
31
|
+
ModeratorSync,
|
32
|
+
WhatSync,
|
33
|
+
WhisperSync,
|
34
|
+
)
|
35
|
+
from .types import DownloaderBy, QueryParameter
|
28
36
|
|
29
37
|
LOGS = logging.getLogger("[Ryzenth] sync")
|
30
38
|
|
@@ -41,6 +49,7 @@ class RyzenthXSync:
|
|
41
49
|
self.federation = FbanSync(self)
|
42
50
|
self.moderator = ModeratorSync(self)
|
43
51
|
self.fonts = FontsSync(self)
|
52
|
+
self.humanizer = HumanizeSync(self)
|
44
53
|
self.obj = Box
|
45
54
|
|
46
55
|
def send_downloader(
|
Ryzenth/helper/__init__.py
CHANGED
@@ -23,6 +23,7 @@ from ._fonts import FontsAsync, FontsSync
|
|
23
23
|
from ._images import ImagesAsync, ImagesSync
|
24
24
|
from ._moderator import ModeratorAsync, ModeratorSync
|
25
25
|
from ._openai import WhisperAsync, WhisperSync
|
26
|
+
from ._ryzenth import HumanizeAsync, HumanizeSync
|
26
27
|
from ._thinking import WhatAsync, WhatSync
|
27
28
|
|
28
29
|
__all__ = [
|
@@ -38,5 +39,7 @@ __all__ = [
|
|
38
39
|
"ModeratorSync",
|
39
40
|
"FontsAsync",
|
40
41
|
"FontsSync",
|
42
|
+
"HumanizeAsync",
|
43
|
+
"HumanizeSync",
|
41
44
|
"Decorators"
|
42
45
|
]
|
Ryzenth/helper/_decorators.py
CHANGED
@@ -24,7 +24,7 @@ from ..types import QueryParameter
|
|
24
24
|
|
25
25
|
class Decorators:
|
26
26
|
def __init__(self, class_func):
|
27
|
-
self._clients_ai = class_func(...,
|
27
|
+
self._clients_ai = class_func(..., is_ok=True)
|
28
28
|
|
29
29
|
def send_ai(self, name: str, only_author=False):
|
30
30
|
def decorator(func):
|
@@ -0,0 +1,73 @@
|
|
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
|
+
|
23
|
+
import httpx
|
24
|
+
|
25
|
+
from .._errors import WhatFuckError
|
26
|
+
from ..types import RequestHumanizer
|
27
|
+
|
28
|
+
LOGS = logging.getLogger("[Ryzenth]")
|
29
|
+
|
30
|
+
class HumanizeAsync:
|
31
|
+
def __init__(self, parent):
|
32
|
+
self.parent = parent
|
33
|
+
|
34
|
+
async def rewrite(self, params: RequestHumanizer, pickle_json=False, dot_access=False):
|
35
|
+
url = f"{self.parent.base_url}/v1/ai/r/Ryzenth-Humanize-05-06-2025"
|
36
|
+
async with httpx.AsyncClient() as client:
|
37
|
+
try:
|
38
|
+
response = await client.get(
|
39
|
+
url,
|
40
|
+
params=params.dict(),
|
41
|
+
headers=self.parent.headers,
|
42
|
+
timeout=self.parent.timeout
|
43
|
+
)
|
44
|
+
response.raise_for_status()
|
45
|
+
if pickle_json:
|
46
|
+
result = response.json()["results"]
|
47
|
+
return json.loads(result)
|
48
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
49
|
+
except httpx.HTTPError as e:
|
50
|
+
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
51
|
+
raise WhatFuckError("[ASYNC] Error fetching") from e
|
52
|
+
|
53
|
+
class HumanizeSync:
|
54
|
+
def __init__(self, parent):
|
55
|
+
self.parent = parent
|
56
|
+
|
57
|
+
def rewrite(self, params: RequestHumanizer, pickle_json=False, dot_access=False):
|
58
|
+
url = f"{self.parent.base_url}/v1/ai/r/Ryzenth-Humanize-05-06-2025"
|
59
|
+
try:
|
60
|
+
response = httpx.get(
|
61
|
+
url,
|
62
|
+
params=params.dict(),
|
63
|
+
headers=self.parent.headers,
|
64
|
+
timeout=self.parent.timeout
|
65
|
+
)
|
66
|
+
response.raise_for_status()
|
67
|
+
if pickle_json:
|
68
|
+
result = response.json()["results"]
|
69
|
+
return json.loads(result)
|
70
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
71
|
+
except httpx.HTTPError as e:
|
72
|
+
LOGS.error(f"[SYNC] Error fetching from humanize {e}")
|
73
|
+
raise WhatFuckError("[SYNC] Error fetching from humanize") from e
|
Ryzenth/types/__init__.py
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
Ryzenth/__init__.py,sha256=vM1IVkgRFQT5o15KYKx8kY59114Jw5taP8ytm9YJy94,996
|
2
|
+
Ryzenth/__version__.py,sha256=h5y4YdrdepFU2B-hlvSyE5t2jfsYpCCn6n_4JHGhiHA,118
|
3
|
+
Ryzenth/_asynchisded.py,sha256=aO04ouIsM_0WTgg3Ntihin5ed7QbdpJc_dqZZAdwv0A,4952
|
4
|
+
Ryzenth/_client.py,sha256=1DhB0Ey-XM8kSpP3ztNkGkrevyLssdFAwLf4mjI6DWU,1867
|
5
|
+
Ryzenth/_errors.py,sha256=PYHmA3xZPZnH8T1Yo0Al6ln2FP8KC9Jk3eN631ve2S4,1236
|
6
|
+
Ryzenth/_synchisded.py,sha256=77DLzv2PmEWKZNVvMPG_0yQ9Lr4rQXuu6yls_eV_Hyg,4772
|
7
|
+
Ryzenth/helper/__init__.py,sha256=BkP6fQ3IJnOqyXn07jD7anumVPlm8lVPNkFnK9b6XpE,1447
|
8
|
+
Ryzenth/helper/_decorators.py,sha256=jmBqzc3wyM8U28z-gf97M-kuBvMLE8laiV7hIqtaVgE,2026
|
9
|
+
Ryzenth/helper/_federation.py,sha256=hQ4XIha9j-ohUGmIJyD8HKWMFudBFU0iRLA-12qt_G0,13940
|
10
|
+
Ryzenth/helper/_fonts.py,sha256=i-1OlJwv_bTZL7Wewodajgotij5awSE04CNJyY_SXEs,3027
|
11
|
+
Ryzenth/helper/_images.py,sha256=bsCLycdlheqEc7I5jm_MVzscrNMX1Q_zmFWm3rhchA8,2297
|
12
|
+
Ryzenth/helper/_moderator.py,sha256=p7e1pRUTP8ROmFnRyNWSD5q65CQUKiavgp7yXCstLhk,5197
|
13
|
+
Ryzenth/helper/_openai.py,sha256=-VMH15PJXuYEu0UbwvlIus6NOsB-KNWBTMQvBU16EDU,2562
|
14
|
+
Ryzenth/helper/_ryzenth.py,sha256=923beacpCH37cUVwtrzgN81Br7ZeoIttN6yKThtRcsQ,2853
|
15
|
+
Ryzenth/helper/_thinking.py,sha256=4V2hH0FwegAGhmlO0YlAeXDH3DS4Omihf6m03YJc-SE,2545
|
16
|
+
Ryzenth/types/__init__.py,sha256=5K66BoRKd0yKdIFxph8FwM6Tr8Ha4sbgFctYlAUUQfw,1206
|
17
|
+
ryzenth-1.9.6.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
18
|
+
ryzenth-1.9.6.dist-info/METADATA,sha256=RSqob24B21U2cNvX5Q0g1mhq1Y1cNP2mWln59AimOqw,4120
|
19
|
+
ryzenth-1.9.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
20
|
+
ryzenth-1.9.6.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
21
|
+
ryzenth-1.9.6.dist-info/RECORD,,
|
ryzenth-1.9.5.dist-info/RECORD
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Ryzenth/__init__.py,sha256=tju93rICOKAx220Z2aSNLXt0HKVd5vRDfeVzrf49WuY,960
|
2
|
-
Ryzenth/__version__.py,sha256=GZ_mDGvbB3eoVmc5YXLSsgEoUlanzoUvVZoo3RpdJic,118
|
3
|
-
Ryzenth/_asynchisded.py,sha256=B44rz4JD4og3go1ZAcd4R8McxSt9vGo5zIpYtTRY3ms,4888
|
4
|
-
Ryzenth/_client.py,sha256=GLNDmDSq6ROiezaLdi-yo2tCWbgSxgpp1DXduxQHapA,1731
|
5
|
-
Ryzenth/_errors.py,sha256=PYHmA3xZPZnH8T1Yo0Al6ln2FP8KC9Jk3eN631ve2S4,1236
|
6
|
-
Ryzenth/_synchisded.py,sha256=KFO3Smy3qKhOPW9cVQ6uutspDZjiZz79hiLaXFgGRfA,4702
|
7
|
-
Ryzenth/helper/__init__.py,sha256=cFM6wA0fkC-KHkaL4jUK6_3zsm_TKpmz3BaW4HJgFiI,1360
|
8
|
-
Ryzenth/helper/_decorators.py,sha256=W9Y4N_ehmMYStcJJVsQr60WQsqHzON3n5uNuTp9yvGM,2041
|
9
|
-
Ryzenth/helper/_federation.py,sha256=hQ4XIha9j-ohUGmIJyD8HKWMFudBFU0iRLA-12qt_G0,13940
|
10
|
-
Ryzenth/helper/_fonts.py,sha256=i-1OlJwv_bTZL7Wewodajgotij5awSE04CNJyY_SXEs,3027
|
11
|
-
Ryzenth/helper/_images.py,sha256=bsCLycdlheqEc7I5jm_MVzscrNMX1Q_zmFWm3rhchA8,2297
|
12
|
-
Ryzenth/helper/_moderator.py,sha256=p7e1pRUTP8ROmFnRyNWSD5q65CQUKiavgp7yXCstLhk,5197
|
13
|
-
Ryzenth/helper/_openai.py,sha256=-VMH15PJXuYEu0UbwvlIus6NOsB-KNWBTMQvBU16EDU,2562
|
14
|
-
Ryzenth/helper/_thinking.py,sha256=4V2hH0FwegAGhmlO0YlAeXDH3DS4Omihf6m03YJc-SE,2545
|
15
|
-
Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
|
16
|
-
ryzenth-1.9.5.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
17
|
-
ryzenth-1.9.5.dist-info/METADATA,sha256=mU4rv5N9kyLt0KbYr86Dxzu12SUNeUoExz9Czp9miVs,4120
|
18
|
-
ryzenth-1.9.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
-
ryzenth-1.9.5.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
20
|
-
ryzenth-1.9.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|