Ryzenth 1.8.5__py3-none-any.whl → 1.8.7__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 CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  from . import *
21
21
  from .__version__ import __version__
22
- from .ryzenth_client import ApiKeyFrom
22
+ from ._client import ApiKeyFrom
23
23
 
24
24
  __all__ = [
25
25
  "ApiKeyFrom"
Ryzenth/__version__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "1.8.5"
1
+ __version__ = "1.8.7"
2
2
  __author__ = "TeamKillerX"
3
3
  __title__ = "Ryzenth"
4
4
  __description__ = "Ryzenth Python API Wrapper"
Ryzenth/_asynchisded.py CHANGED
@@ -22,7 +22,7 @@ import logging
22
22
  import httpx
23
23
  from box import Box
24
24
 
25
- from Ryzenth.types import QueryParameter
25
+ from Ryzenth.types import DownloaderBy, QueryParameter
26
26
 
27
27
  LOGS = logging.getLogger("[Ryzenth] async")
28
28
 
@@ -32,8 +32,24 @@ class RyzenthXAsync:
32
32
  self.base_url = base_url.rstrip("/")
33
33
  self.headers = {"x-api-key": self.api_key}
34
34
  self.images = self.ImagesAsync(self)
35
+ self.what = self.WhatAsync(self)
35
36
  self.obj = Box
36
37
 
38
+ class WhatAsync:
39
+ def __init__(self, parent):
40
+ self.parent = parent
41
+
42
+ async def think(self, params: QueryParameter, dot_access=False):
43
+ url = f"{self.parent.base_url}/v1/ai/deepseek/deepseek-r1-distill-qwen-32b"
44
+ async with httpx.AsyncClient() as client:
45
+ try:
46
+ response = await client.get(url, params=params.dict(), headers=self.parent.headers, timeout=30)
47
+ response.raise_for_status()
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
+ return None
52
+
37
53
  class ImagesAsync:
38
54
  def __init__(self, parent):
39
55
  self.parent = parent
@@ -52,7 +68,7 @@ class RyzenthXAsync:
52
68
  async def send_downloader(
53
69
  self,
54
70
  switch_name: str = None,
55
- params: QueryParameter = None,
71
+ params: DownloaderBy = None,
56
72
  list_key=False,
57
73
  dot_access=False
58
74
  ):
@@ -24,9 +24,17 @@ from Ryzenth._synchisded import RyzenthXSync
24
24
 
25
25
 
26
26
  class ApiKeyFrom:
27
- def __init__(self, api_key: str = None):
27
+ def __init__(self, api_key: str = None, is_free_from_ryzenth=False):
28
+ if api_key is Ellipsis:
29
+ is_free_from_ryzenth = True
30
+ api_key = None
31
+
28
32
  if not api_key:
29
33
  api_key = os.environ.get("RYZENTH_API_KEY")
34
+
35
+ if not api_key:
36
+ api_key = "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC" if is_free_from_ryzenth else None
37
+
30
38
  self.api_key = api_key
31
39
  self.aio = RyzenthXAsync(api_key)
32
40
  self._sync = RyzenthXSync(api_key)
Ryzenth/_synchisded.py CHANGED
@@ -22,7 +22,7 @@ import logging
22
22
  import httpx
23
23
  from box import Box
24
24
 
25
- from Ryzenth.types import QueryParameter
25
+ from Ryzenth.types import DownloaderBy, QueryParameter
26
26
 
27
27
  LOGS = logging.getLogger("[Ryzenth] sync")
28
28
 
@@ -32,8 +32,28 @@ class RyzenthXSync:
32
32
  self.base_url = base_url.rstrip("/")
33
33
  self.headers = {"x-api-key": self.api_key}
34
34
  self.images = self.ImagesSync(self)
35
+ self.what = self.WhatSync(self)
35
36
  self.obj = Box
36
37
 
38
+ class WhatSync:
39
+ def __init__(self, parent):
40
+ self.parent = parent
41
+
42
+ def think(self, params: QueryParameter, dot_access=False):
43
+ url = f"{self.parent.base_url}/v1/ai/deepseek/deepseek-r1-distill-qwen-32b"
44
+ try:
45
+ response = httpx.get(
46
+ url,
47
+ params=params.dict(),
48
+ headers=self.parent.headers,
49
+ timeout=30
50
+ )
51
+ response.raise_for_status()
52
+ return self.parent.obj(response.json() or {}) if dot_access else response.json()
53
+ except httpx.HTTPError as e:
54
+ LOGS.error(f"[SYNC] Error fetching from deepseek {e}")
55
+ return None
56
+
37
57
  class ImagesSync:
38
58
  def __init__(self, parent):
39
59
  self.parent = parent
@@ -56,7 +76,7 @@ class RyzenthXSync:
56
76
  def send_downloader(
57
77
  self,
58
78
  switch_name: str = None,
59
- params: QueryParameter = None,
79
+ params: DownloaderBy = None,
60
80
  list_key=False,
61
81
  dot_access=False
62
82
  ):
Ryzenth/types/__init__.py CHANGED
@@ -24,5 +24,7 @@ from pydantic import BaseModel
24
24
 
25
25
 
26
26
  class QueryParameter(BaseModel):
27
- query: Optional[str] = None
28
- url: Optional[str] = None
27
+ query: str
28
+
29
+ class DownloaderBy(BaseModel):
30
+ url: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Ryzenth
3
- Version: 1.8.5
3
+ Version: 1.8.7
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -86,7 +86,7 @@ pip install ryzenth[fast]
86
86
  from Ryzenth import ApiKeyFrom
87
87
  from Ryzenth.types import QueryParameter
88
88
 
89
- ryz = ApiKeyFrom("your-api-key")
89
+ ryz = ApiKeyFrom(..., is_free_from_ryzenth=True)
90
90
 
91
91
  await ryz.aio.send_message(
92
92
  "hybrid",
@@ -102,7 +102,7 @@ await ryz.aio.send_message(
102
102
  from Ryzenth import ApiKeyFrom
103
103
  from Ryzenth.types import QueryParameter
104
104
 
105
- ryz = ApiKeyFrom("your-api-key")
105
+ ryz = ApiKeyFrom(..., is_free_from_ryzenth=True)
106
106
  ryz._sync.send_message(
107
107
  "hybrid",
108
108
  QueryParameter(
@@ -112,7 +112,7 @@ ryz._sync.send_message(
112
112
  ```
113
113
 
114
114
  ## Environment Variable Support
115
- - Available API key v2 via [`@aknuserbot`](https://t.me/aknuserbot)
115
+ - Available API key v2 via [`@RyzenthKeyBot`](https://t.me/RyzenthKeyBot)
116
116
 
117
117
  You can skip passing the API key directly by setting it via environment:
118
118
 
@@ -0,0 +1,11 @@
1
+ Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
2
+ Ryzenth/__version__.py,sha256=y3oVj4a94Xad01PaVSmZEY3iYLp5cn_eJ2km-fRTEbA,118
3
+ Ryzenth/_asynchisded.py,sha256=ySUWEsx4V2lT93OiiPy7RvWHqVuYtm3ySno6ddJYFAM,5804
4
+ Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
5
+ Ryzenth/_synchisded.py,sha256=Et4yIWvsg8UH3_bXBNevnEQzYNkz6F8mj_0W-dQEFI0,5644
6
+ Ryzenth/types/__init__.py,sha256=imnQqDE2egYlFm2_4DRjleLLkFTRthcdZChRBVJvjoc,983
7
+ ryzenth-1.8.7.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
8
+ ryzenth-1.8.7.dist-info/METADATA,sha256=fwGlfxqmVbex7WWCWaI9NbWU0PMEk0J-OFeO6tyN7i4,4181
9
+ ryzenth-1.8.7.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
10
+ ryzenth-1.8.7.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
11
+ ryzenth-1.8.7.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- Ryzenth/__init__.py,sha256=Xkdo2DrOr9eOGlRdLUC9blzsuHHGIC9WrzGs1j83d3I,944
2
- Ryzenth/__version__.py,sha256=ODPSox1NrHL0AAM5MIJe7C0__Hxs6rf5MyMl4lHEn5A,118
3
- Ryzenth/_asynchisded.py,sha256=6h5qh9vGr9MECtf6YgXW__Hr87Rig2C9mDuqPX5JIQ4,5022
4
- Ryzenth/_synchisded.py,sha256=hJK-M3ovoH2i1SA-hSI7_veVzk_QD_OstLlBYRbUW7Q,4845
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.5.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
8
- ryzenth-1.8.5.dist-info/METADATA,sha256=_GA0RN1G6hBby4_cyzs10NTxJJgriwxcU66xlKsvotA,4143
9
- ryzenth-1.8.5.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
10
- ryzenth-1.8.5.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
11
- ryzenth-1.8.5.dist-info/RECORD,,