Ryzenth 2.0.1__tar.gz → 2.0.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.
Files changed (36) hide show
  1. {ryzenth-2.0.1 → ryzenth-2.0.3}/PKG-INFO +1 -1
  2. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/__init__.py +7 -2
  3. ryzenth-2.0.3/Ryzenth/__version__.py +10 -0
  4. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/_asynchisded.py +22 -6
  5. ryzenth-2.0.3/Ryzenth/_client.py +121 -0
  6. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/_errors.py +5 -0
  7. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/_shared.py +3 -1
  8. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/_synchisded.py +15 -4
  9. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_images.py +27 -4
  10. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_openai.py +2 -2
  11. ryzenth-2.0.3/Ryzenth/tests/test_send_downloader.py +47 -0
  12. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/types/__init__.py +6 -1
  13. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth.egg-info/PKG-INFO +1 -1
  14. ryzenth-2.0.1/Ryzenth/__version__.py +0 -4
  15. ryzenth-2.0.1/Ryzenth/_client.py +0 -61
  16. ryzenth-2.0.1/Ryzenth/tests/test_send_downloader.py +0 -25
  17. {ryzenth-2.0.1 → ryzenth-2.0.3}/LICENSE +0 -0
  18. {ryzenth-2.0.1 → ryzenth-2.0.3}/README.md +0 -0
  19. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/__init__.py +0 -0
  20. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_decorators.py +0 -0
  21. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_federation.py +0 -0
  22. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_fonts.py +0 -0
  23. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_moderator.py +0 -0
  24. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_ryzenth.py +0 -0
  25. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/helper/_thinking.py +0 -0
  26. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/pyoraddons/__init__.py +0 -0
  27. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/tests/__init__.py +0 -0
  28. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/tests/test_deepseek.py +0 -0
  29. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/tests/test_moderator.py +0 -0
  30. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth/tests/test_send.py +0 -0
  31. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth.egg-info/SOURCES.txt +0 -0
  32. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth.egg-info/dependency_links.txt +0 -0
  33. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth.egg-info/requires.txt +0 -0
  34. {ryzenth-2.0.1 → ryzenth-2.0.3}/Ryzenth.egg-info/top_level.txt +0 -0
  35. {ryzenth-2.0.1 → ryzenth-2.0.3}/setup.cfg +0 -0
  36. {ryzenth-2.0.1 → ryzenth-2.0.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Ryzenth
3
- Version: 2.0.1
3
+ Version: 2.0.3
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -19,6 +19,11 @@
19
19
 
20
20
  from . import *
21
21
  from .__version__ import __version__
22
- from ._client import ApiKeyFrom, SmallConvertDot, UrHellFrom
22
+ from ._client import ApiKeyFrom, RyzenthApiClient, SmallConvertDot, UrHellFrom
23
23
 
24
- __all__ = [ "ApiKeyFrom", "UrHellFrom", "SmallConvertDot"]
24
+ __all__ = [
25
+ "ApiKeyFrom",
26
+ "RyzenthApiClient",
27
+ "UrHellFrom",
28
+ "SmallConvertDot"
29
+ ]
@@ -0,0 +1,10 @@
1
+ import platform
2
+
3
+
4
+ def get_user_agent() -> str:
5
+ return f"Ryzenth/Python-{platform.python_version()}"
6
+
7
+ __version__ = "2.0.3"
8
+ __author__ = "TeamKillerX"
9
+ __title__ = "Ryzenth"
10
+ __description__ = "Ryzenth Python API Wrapper"
@@ -18,11 +18,13 @@
18
18
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
  import logging
21
+ import platform
21
22
  from typing import Union
22
23
 
23
24
  import httpx
24
25
  from box import Box
25
26
 
27
+ from .__version__ import get_user_agent
26
28
  from ._errors import InvalidModelError, WhatFuckError
27
29
  from ._shared import BASE_DICT_AI_RYZENTH, BASE_DICT_OFFICIAL, BASE_DICT_RENDER
28
30
  from .helper import (
@@ -34,14 +36,17 @@ from .helper import (
34
36
  WhatAsync,
35
37
  WhisperAsync,
36
38
  )
37
- from .types import DownloaderBy, QueryParameter, Username
39
+ from .types import DownloaderBy, QueryParameter, RequestXnxx, Username
38
40
 
39
41
 
40
42
  class RyzenthXAsync:
41
43
  def __init__(self, api_key: str, base_url: str = "https://randydev-ryu-js.hf.space/api"):
42
44
  self.api_key = api_key
43
45
  self.base_url = base_url.rstrip("/")
44
- self.headers = {"x-api-key": self.api_key}
46
+ self.headers = {
47
+ "User-Agent": get_user_agent(),
48
+ "x-api-key": self.api_key
49
+ }
45
50
  self.timeout = 10
46
51
  self.params = {}
47
52
  self.images = ImagesAsync(self)
@@ -66,7 +71,13 @@ class RyzenthXAsync:
66
71
  self,
67
72
  switch_name: str,
68
73
  *,
69
- params: Union[DownloaderBy, QueryParameter, Username] = None,
74
+ params: Union[
75
+ DownloaderBy,
76
+ QueryParameter,
77
+ Username,
78
+ RequestXnxx
79
+ ] = None,
80
+ params_only=True,
70
81
  on_render=False,
71
82
  dot_access=False
72
83
  ):
@@ -78,7 +89,12 @@ class RyzenthXAsync:
78
89
 
79
90
  async with httpx.AsyncClient() as client:
80
91
  try:
81
- response = await self._client_downloader_get(client, params, model_name)
92
+ response = await self._client_downloader_get(
93
+ client,
94
+ params,
95
+ params_only,
96
+ model_name
97
+ )
82
98
  response.raise_for_status()
83
99
  return self.obj(response.json() or {}) if dot_access else response.json()
84
100
  except httpx.HTTPError as e:
@@ -93,10 +109,10 @@ class RyzenthXAsync:
93
109
  timeout=self.timeout
94
110
  )
95
111
 
96
- async def _client_downloader_get(self, client, params, model_param):
112
+ async def _client_downloader_get(self, client, params, params_only, model_param):
97
113
  return await client.get(
98
114
  f"{self.base_url}/v1/dl/{model_param}",
99
- params=params.model_dump(),
115
+ params=params.model_dump() if params_only else None,
100
116
  headers=self.headers,
101
117
  timeout=self.timeout
102
118
  )
@@ -0,0 +1,121 @@
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 os
21
+ import platform
22
+ import typing as t
23
+
24
+ import aiohttp
25
+ from box import Box
26
+
27
+ from .__version__ import get_user_agent
28
+ from ._asynchisded import RyzenthXAsync
29
+ from ._errors import ForbiddenError, WhatFuckError
30
+ from ._synchisded import RyzenthXSync
31
+ from .helper import Decorators
32
+
33
+
34
+ class ApiKeyFrom:
35
+ def __init__(self, api_key: str = None, is_ok=False):
36
+ if api_key is Ellipsis:
37
+ is_ok = True
38
+ api_key = None
39
+
40
+ if not api_key:
41
+ api_key = os.environ.get("RYZENTH_API_KEY")
42
+
43
+ if not api_key:
44
+ api_key = "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC" if is_ok else None
45
+
46
+ self.api_key = api_key
47
+ self.aio = RyzenthXAsync(api_key)
48
+ self._sync = RyzenthXSync(api_key)
49
+
50
+ def something(self):
51
+ pass
52
+
53
+ class UrHellFrom:
54
+ def __init__(self, name: str, only_author=False):
55
+ self.decorators = Decorators(ApiKeyFrom)
56
+ self.ai = self.decorators.send_ai(name=name, only_author=only_author)
57
+
58
+ def something(self):
59
+ pass
60
+
61
+ class SmallConvertDot:
62
+ def __init__(self, obj):
63
+ self.obj = obj
64
+
65
+ def to_dot(self):
66
+ return Box(self.obj if self.obj is not None else {})
67
+
68
+
69
+ class RyzenthApiClient:
70
+ BASE_URL = "https://randydev-ryu-js.hf.space"
71
+
72
+ def __init__(self, *, api_key: str) -> None:
73
+ if not api_key:
74
+ raise WhatFuckError("API Key cannot be empty.")
75
+ self._api_key: str = api_key
76
+ self._session: aiohttp.ClientSession = aiohttp.ClientSession(
77
+ headers={
78
+ "User-Agent": get_user_agent(),
79
+ "x-api-key": f"{self._api_key}"
80
+ }
81
+ )
82
+
83
+ @classmethod
84
+ def from_env(cls) -> "RyzenthApiClient":
85
+ api_key: t.Optional[str] = os.environ.get("RYZENTH_API_KEY")
86
+ if not api_key:
87
+ raise WhatFuckError("API Key cannot be empty.")
88
+ return cls(api_key=api_key)
89
+
90
+ async def get(self, path: str, params: t.Optional[dict] = None) -> dict:
91
+ url = f"{self.BASE_URL}{path}"
92
+ try:
93
+ async with self._session.get(url, params=params) as resp:
94
+ if resp.status == 403:
95
+ raise ForbiddenError("Access Forbidden: You may be blocked or banned.")
96
+ resp.raise_for_status()
97
+ return await resp.json()
98
+ except ForbiddenError as e:
99
+ return {"error": str(e)}
100
+ except aiohttp.ClientResponseError as e:
101
+ return {"error": f"HTTP Error: {e.status} {e.message}"}
102
+ except Exception as e:
103
+ return {"error": str(e)}
104
+
105
+ async def post(self, path: str, data: t.Optional[dict] = None, json: t.Optional[dict] = None) -> dict:
106
+ url = f"{self.BASE_URL}{path}"
107
+ try:
108
+ async with self._session.post(url, data=data, json=json) as resp:
109
+ if resp.status == 403:
110
+ raise ForbiddenError("Access Forbidden: You may be blocked or banned.")
111
+ resp.raise_for_status()
112
+ return await resp.json()
113
+ except ForbiddenError as e:
114
+ return {"error": str(e)}
115
+ except aiohttp.ClientResponseError as e:
116
+ return {"error": f"HTTP Error: {e.status} {e.message}"}
117
+ except Exception as e:
118
+ return {"error": str(e)}
119
+
120
+ async def close(self):
121
+ await self._session.close()
@@ -26,6 +26,10 @@ class WhatFuckError(Exception):
26
26
  class ParamsRequiredError(ValueError):
27
27
  pass
28
28
 
29
+ class ForbiddenError(Exception):
30
+ """Custom exception for 403 Forbidden"""
31
+ pass
32
+
29
33
  class RequiredError(ValueError):
30
34
  pass
31
35
 
@@ -46,6 +50,7 @@ class InvalidEmptyError(ValueError):
46
50
 
47
51
  __all__ = [
48
52
  "WhatFuckError",
53
+ "ForbiddenError",
49
54
  "ParamsRequiredError",
50
55
  "InvalidVersionError",
51
56
  "InvalidJSONDecodeError",
@@ -15,7 +15,9 @@ BASE_DICT_RENDER = {
15
15
  "pinterest-search": "pinterest-search-dl", #query #render
16
16
  "tiktok-search": "tiktok-search-dl", #query #render
17
17
  "yt-username": "yt-username", #username #render
18
- "tiktok-username": "tiktok-username" #username #render
18
+ "tiktok-username": "tiktok-username", #username #render
19
+ "xnxx-dl": "xnxx-dl", #types optional #render
20
+ "hentai-anime": "hentai-anime" #None, render
19
21
  }
20
22
 
21
23
  BASE_DICT_OFFICIAL = {
@@ -18,11 +18,13 @@
18
18
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
  import logging
21
+ import platform
21
22
  from typing import Union
22
23
 
23
24
  import httpx
24
25
  from box import Box
25
26
 
27
+ from .__version__ import get_user_agent
26
28
  from ._errors import InvalidModelError, WhatFuckError
27
29
  from ._shared import BASE_DICT_AI_RYZENTH, BASE_DICT_OFFICIAL, BASE_DICT_RENDER
28
30
  from .helper import (
@@ -34,14 +36,17 @@ from .helper import (
34
36
  WhatSync,
35
37
  WhisperSync,
36
38
  )
37
- from .types import DownloaderBy, QueryParameter, Username
39
+ from .types import DownloaderBy, QueryParameter, RequestXnxx, Username
38
40
 
39
41
 
40
42
  class RyzenthXSync:
41
43
  def __init__(self, api_key: str, base_url: str = "https://randydev-ryu-js.hf.space/api"):
42
44
  self.api_key = api_key
43
45
  self.base_url = base_url.rstrip("/")
44
- self.headers = {"x-api-key": self.api_key}
46
+ self.headers = {
47
+ "User-Agent": get_user_agent(),
48
+ "x-api-key": self.api_key
49
+ }
45
50
  self.timeout = 10
46
51
  self.params = {}
47
52
  self.images = ImagesSync(self)
@@ -66,7 +71,13 @@ class RyzenthXSync:
66
71
  self,
67
72
  switch_name: str,
68
73
  *,
69
- params: Union[DownloaderBy, QueryParameter, Username] = None,
74
+ params: Union[
75
+ DownloaderBy,
76
+ QueryParameter,
77
+ Username,
78
+ RequestXnxx
79
+ ] = None,
80
+ params_only=True,
70
81
  on_render=False,
71
82
  dot_access=False
72
83
  ):
@@ -77,7 +88,7 @@ class RyzenthXSync:
77
88
  try:
78
89
  response = httpx.get(
79
90
  f"{self.base_url}/v1/dl/{model_name}",
80
- params=params.model_dump(),
91
+ params=params.model_dump() if params_only else None,
81
92
  headers=self.headers,
82
93
  timeout=self.timeout
83
94
  )
@@ -25,27 +25,36 @@ class ImagesAsync:
25
25
  def __init__(self, parent):
26
26
  self.parent = parent
27
27
 
28
- async def generate(self, params: QueryParameter):
28
+ async def generate(self, params: QueryParameter) -> bytes:
29
29
  url = f"{self.parent.base_url}/v1/flux/black-forest-labs/flux-1-schnell"
30
30
  async with self.parent.httpx.AsyncClient() as client:
31
31
  try:
32
- response = await client.get(url, params=params.dict(), headers=self.parent.headers, timeout=self.parent.timeout)
32
+ response = await client.get(
33
+ url,
34
+ params=params.model_dump(),
35
+ headers=self.parent.headers,
36
+ timeout=self.parent.timeout
37
+ )
33
38
  response.raise_for_status()
34
39
  return response.content
35
40
  except self.parent.httpx.HTTPError as e:
36
41
  self.parent.logger.error(f"[ASYNC] Error: {str(e)}")
37
42
  raise WhatFuckError("[ASYNC] Error fetching") from e
38
43
 
44
+ async def to_save(self, params: QueryParameter, file_path="fluxai.jpg"):
45
+ content = await self.generate(params)
46
+ return ResponseFileImage(content).to_save(file_path)
47
+
39
48
  class ImagesSync:
40
49
  def __init__(self, parent):
41
50
  self.parent = parent
42
51
 
43
- def generate(self, params: QueryParameter):
52
+ def generate(self, params: QueryParameter) -> bytes:
44
53
  url = f"{self.parent.base_url}/v1/flux/black-forest-labs/flux-1-schnell"
45
54
  try:
46
55
  response = self.parent.httpx.get(
47
56
  url,
48
- params=params.dict(),
57
+ params=params.model_dump(),
49
58
  headers=self.parent.headers,
50
59
  timeout=self.parent.timeout
51
60
  )
@@ -54,3 +63,17 @@ class ImagesSync:
54
63
  except self.parent.httpx.HTTPError as e:
55
64
  self.parent.logger.error(f"[SYNC] Error fetching from images {e}")
56
65
  raise WhatFuckError("[SYNC] Error fetching from images") from e
66
+
67
+ def to_save(self, params: QueryParameter, file_path="fluxai.jpg"):
68
+ content = self.generate(params)
69
+ return ResponseFileImage(content).to_save(file_path)
70
+
71
+
72
+ class ResponseFileImage:
73
+ def __init__(self, response_content: bytes):
74
+ self.response_content = response_content
75
+
76
+ def to_save(self, file_path="fluxai.jpg"):
77
+ with open(file_path, "wb") as f:
78
+ f.write(self.response_content)
79
+ return file_path
@@ -31,7 +31,7 @@ class WhisperAsync:
31
31
  try:
32
32
  response = await client.get(
33
33
  url,
34
- params=params.dict(),
34
+ params=params.model_dump(),
35
35
  headers=self.parent.headers,
36
36
  timeout=self.parent.timeout
37
37
  )
@@ -50,7 +50,7 @@ class WhisperSync:
50
50
  try:
51
51
  response = self.parent.httpx.get(
52
52
  url,
53
- params=params.dict(),
53
+ params=params.model_dump(),
54
54
  headers=self.parent.headers,
55
55
  timeout=self.parent.timeout
56
56
  )
@@ -0,0 +1,47 @@
1
+ from Ryzenth._synchisded import RyzenthXSync
2
+ from Ryzenth.types import QueryParameter, RequestXnxx, Username
3
+
4
+
5
+ def test_send_downloader():
6
+ ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
7
+ result = ryz.send_downloader(
8
+ switch_name="tiktok-search",
9
+ params=QueryParameter(
10
+ query="cat coding"
11
+ ),
12
+ on_render=True
13
+ )
14
+ assert result is not None
15
+
16
+ def test_yt_username():
17
+ ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
18
+ result = ryz.send_downloader(
19
+ switch_name="yt-username",
20
+ params=Username(
21
+ username="AnimeNgoding"
22
+ ),
23
+ on_render=True
24
+ )
25
+ assert result is not None
26
+
27
+ def test_hentai_anime():
28
+ ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
29
+ result = ryz.send_downloader(
30
+ switch_name="hentai-anime",
31
+ params=None,
32
+ params_only=False,
33
+ on_render=True
34
+ )
35
+ assert result is not None
36
+
37
+ def test_xnxxdl():
38
+ ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
39
+ result = ryz.send_downloader(
40
+ switch_name="xnxx-dl",
41
+ params=RequestXnxx(
42
+ query="boobs",
43
+ is_download=False
44
+ ),
45
+ on_render=True
46
+ )
47
+ assert result is not None
@@ -20,7 +20,7 @@
20
20
 
21
21
  from typing import Any, Optional
22
22
 
23
- from pydantic import BaseModel
23
+ from pydantic import BaseModel, Field
24
24
 
25
25
 
26
26
  class QueryParameter(BaseModel):
@@ -37,6 +37,11 @@ class OpenaiWhisper(BaseModel):
37
37
  language: Optional[str] = None
38
38
  task: Optional[str] = None
39
39
 
40
+ class RequestXnxx(BaseModel):
41
+ query: str
42
+ is_download: bool = Field(False, alias="isDownload")
43
+ url: Optional[str] = None
44
+
40
45
  class RequestHumanizer(BaseModel):
41
46
  text: str
42
47
  writing_style: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Ryzenth
3
- Version: 2.0.1
3
+ Version: 2.0.3
4
4
  Summary: Ryzenth Python Wrapper For Perfomance
5
5
  Author: TeamKillerX
6
6
  License: MIT
@@ -1,4 +0,0 @@
1
- __version__ = "2.0.1"
2
- __author__ = "TeamKillerX"
3
- __title__ = "Ryzenth"
4
- __description__ = "Ryzenth Python API Wrapper"
@@ -1,61 +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
- import os
21
-
22
- from box import Box
23
-
24
- from ._asynchisded import RyzenthXAsync
25
- from ._synchisded import RyzenthXSync
26
- from .helper import Decorators
27
-
28
-
29
- class ApiKeyFrom:
30
- def __init__(self, api_key: str = None, is_ok=False):
31
- if api_key is Ellipsis:
32
- is_ok = True
33
- api_key = None
34
-
35
- if not api_key:
36
- api_key = os.environ.get("RYZENTH_API_KEY")
37
-
38
- if not api_key:
39
- api_key = "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC" if is_ok else None
40
-
41
- self.api_key = api_key
42
- self.aio = RyzenthXAsync(api_key)
43
- self._sync = RyzenthXSync(api_key)
44
-
45
- def something(self):
46
- pass
47
-
48
- class UrHellFrom:
49
- def __init__(self, name: str, only_author=False):
50
- self.decorators = Decorators(ApiKeyFrom)
51
- self.ai = self.decorators.send_ai(name=name, only_author=only_author)
52
-
53
- def something(self):
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 {})
@@ -1,25 +0,0 @@
1
- from Ryzenth._synchisded import RyzenthXSync
2
- from Ryzenth.types import QueryParameter, Username
3
-
4
-
5
- def test_send_downloader():
6
- ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
7
- result = ryz.send_downloader(
8
- switch_name="tiktok-search",
9
- params=QueryParameter(
10
- query="cat coding"
11
- ),
12
- on_render=True
13
- )
14
- assert result is not None
15
-
16
- def test_yt_username():
17
- ryz = RyzenthXSync("test", base_url="https://x-api-js.onrender.com/api")
18
- result = ryz.send_downloader(
19
- switch_name="yt-username",
20
- params=Username(
21
- username="AnimeNgoding"
22
- ),
23
- on_render=True
24
- )
25
- assert result is not None
File without changes
File without changes
File without changes
File without changes