Rubka 7.1.16__tar.gz → 7.1.17__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.
- {rubka-7.1.16 → rubka-7.1.17}/PKG-INFO +1 -1
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/PKG-INFO +1 -1
- {rubka-7.1.16 → rubka-7.1.17}/rubka/asynco.py +12 -3
- {rubka-7.1.16 → rubka-7.1.17}/setup.py +1 -1
- {rubka-7.1.16 → rubka-7.1.17}/README.md +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/SOURCES.txt +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/dependency_links.txt +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/entry_points.txt +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/not-zip-safe +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/requires.txt +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/Rubka.egg-info/top_level.txt +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/client/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/client/client.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/crypto/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/crypto/crypto.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/enums.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/exceptions.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/methods/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/methods/methods.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/network/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/network/helper.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/network/network.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/network/socket.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/sessions/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/sessions/sessions.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/types/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/types/socket/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/types/socket/message.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/utils/__init__.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/utils/configs.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/adaptorrubka/utils/utils.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/api.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/button.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/config.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/context.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/decorators.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/exceptions.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/filters.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/helpers.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/jobs.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/keyboards.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/keypad.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/logger.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/metadata.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/rubino.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/tv.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/update.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/rubka/utils.py +0 -0
- {rubka-7.1.16 → rubka-7.1.17}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rubka
|
|
3
|
-
Version: 7.1.
|
|
3
|
+
Version: 7.1.17
|
|
4
4
|
Summary: Rubika: A Python library for interacting with the Rubika Bot API. This library provides an easy-to-use interface to send messages, polls, stickers, media files, manage groups and channels, handle inline keyboards, and implement advanced bot features like subscription management, user authentication, and message handling. Ideal for developers looking to automate and extend their Rubika bots with Python.
|
|
5
5
|
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
6
|
Download-URL: https://github.com/Mahdy-Ahmadi/rubka/archive/refs/tags/v6.6.4.zip
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rubka
|
|
3
|
-
Version: 7.1.
|
|
3
|
+
Version: 7.1.17
|
|
4
4
|
Summary: Rubika: A Python library for interacting with the Rubika Bot API. This library provides an easy-to-use interface to send messages, polls, stickers, media files, manage groups and channels, handle inline keyboards, and implement advanced bot features like subscription management, user authentication, and message handling. Ideal for developers looking to automate and extend their Rubika bots with Python.
|
|
5
5
|
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
6
|
Download-URL: https://github.com/Mahdy-Ahmadi/rubka/archive/refs/tags/v6.6.4.zip
|
|
@@ -171,7 +171,10 @@ def get_installed_version(package_name: str) -> Optional[str]:
|
|
|
171
171
|
return version(package_name)
|
|
172
172
|
except PackageNotFoundError:
|
|
173
173
|
return None
|
|
174
|
-
|
|
174
|
+
BASE_URLS = {
|
|
175
|
+
"botapi": "https://botapi.rubika.ir/v3",
|
|
176
|
+
"messenger": "https://messengerg2b1.iranlms.ir/v3"
|
|
177
|
+
}
|
|
175
178
|
async def get_latest_version(package_name: str) -> Optional[str]:
|
|
176
179
|
url = f"https://pypi.org/pypi/{package_name}/json"
|
|
177
180
|
try:
|
|
@@ -265,7 +268,8 @@ safeSendMode ensures reliable message sending even if replying by message_id fai
|
|
|
265
268
|
max_cache_size and max_msg_age help manage duplicate message processing efficiently.
|
|
266
269
|
"""
|
|
267
270
|
|
|
268
|
-
|
|
271
|
+
|
|
272
|
+
def __init__(self, token: str, session_name: str = None, auth: str = None, Key: str = None, platform: str = "web", web_hook: str = None, timeout: int = 10, show_progress: bool = False, raise_errors: bool = True,proxy: str = None,retries: int = 2,retry_delay: float = 0.5,user_agent: str = None,safeSendMode = False,max_cache_size: int = 2000,max_msg_age : int = 60,chunk_size : int = 64 * 1024,parse_mode: Optional[Literal["HTML", "Markdown"]] = "Markdown",api_endpoint: Optional[Literal["botapi", "messenger"]] = "botapi"):
|
|
269
273
|
self.token = token
|
|
270
274
|
self._inline_query_handlers: List[dict] = []
|
|
271
275
|
self.timeout = timeout
|
|
@@ -276,6 +280,7 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
|
|
|
276
280
|
self.proxy = proxy
|
|
277
281
|
self.max_msg_age = max_msg_age
|
|
278
282
|
self.retries = retries
|
|
283
|
+
|
|
279
284
|
self.retry_delay = retry_delay
|
|
280
285
|
self.raise_errors = raise_errors
|
|
281
286
|
self.show_progress = show_progress
|
|
@@ -297,6 +302,8 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
|
|
|
297
302
|
self._db_path = os.path.join(os.getcwd(), "RubkaSaveMessage.db")
|
|
298
303
|
self._ensure_db()
|
|
299
304
|
self._message_handlers: List[dict] = []
|
|
305
|
+
if api_endpoint not in BASE_URLS:raise ValueError(f"api_endpoint must be one of {list(BASE_URLS.keys())}")
|
|
306
|
+
self.api_endpoint = api_endpoint
|
|
300
307
|
|
|
301
308
|
logger.info(f"Initialized RubikaBot with token: {token[:8]}***")
|
|
302
309
|
async def _get_session(self) -> aiohttp.ClientSession:
|
|
@@ -337,7 +344,9 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
|
|
|
337
344
|
logger.error(f"Failed to set webhook from {self.web_hook}: {e}")
|
|
338
345
|
self.web_hook = None
|
|
339
346
|
async def _post(self, method: str, data: Dict[str, Any]) -> Dict[str, Any]:
|
|
340
|
-
|
|
347
|
+
base_url = BASE_URLS[self.api_endpoint]
|
|
348
|
+
url = f"{base_url}/{self.token}/{method}"
|
|
349
|
+
print(url)
|
|
341
350
|
session = await self._get_session()
|
|
342
351
|
for attempt in range(1, self.retries + 1):
|
|
343
352
|
try:
|
|
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding="utf-8") as f:
|
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name='Rubka',
|
|
16
|
-
version='7.1.
|
|
16
|
+
version='7.1.17',
|
|
17
17
|
description=(
|
|
18
18
|
"Rubika: A Python library for interacting with the Rubika Bot API. "
|
|
19
19
|
"This library provides an easy-to-use interface to send messages, polls, "
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|