Pytdbot 0.10.0.dev7__py3-none-any.whl → 0.10.0.dev9__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.
pytdbot/__init__.py CHANGED
@@ -13,7 +13,7 @@ __all__ = [
13
13
  "Client",
14
14
  ]
15
15
 
16
- __version__ = "0.10.0.dev7"
16
+ __version__ = "0.10.0.dev9"
17
17
  __copyright__ = "Copyright (c) 2022-2026 Pytdbot, AYMENJD"
18
18
  __license__ = "MIT License"
19
19
 
pytdbot/client.py CHANGED
@@ -7,7 +7,6 @@ from collections.abc import Callable
7
7
  from importlib import import_module
8
8
  from importlib import reload as reload_module
9
9
  from inspect import iscoroutinefunction
10
- from json import dumps
11
10
  from logging import DEBUG, getLogger
12
11
  from os.path import join as join_path
13
12
  from pathlib import Path
@@ -37,6 +36,7 @@ from .utils import (
37
36
  json_dumps,
38
37
  json_loads,
39
38
  obj_to_dict,
39
+ obj_to_json,
40
40
  )
41
41
 
42
42
 
@@ -510,7 +510,7 @@ class Client(Decorators, Methods):
510
510
  if (
511
511
  self.logger.root.level >= DEBUG or self.logger.level >= DEBUG
512
512
  ): # dumping all requests may create performance issues
513
- self.logger.debug(f"Sending: {dumps(request, indent=4)}")
513
+ self.logger.debug(f"Sending: {obj_to_json(request, indent=4)}")
514
514
 
515
515
  is_chat_attempted_load = request_method == "getchat"
516
516
  is_message_attempted_load = request_method in self.get_message_methods
@@ -843,7 +843,7 @@ class Client(Decorators, Methods):
843
843
 
844
844
  if is_debug:
845
845
  self.logger.debug(
846
- f"Received result for {result_id}: {dumps(update, indent=4)}"
846
+ f"Received result for {result_id}: {obj_to_json(update, indent=4)}"
847
847
  )
848
848
 
849
849
  if result_id and (result := self._results.pop(result_id, None)):
@@ -855,7 +855,7 @@ class Client(Decorators, Methods):
855
855
  return
856
856
 
857
857
  if is_debug:
858
- self.logger.debug(f"Received: {dumps(update, indent=4)}")
858
+ self.logger.debug(f"Received: {obj_to_json(update, indent=4)}")
859
859
 
860
860
  update_obj = dict_to_obj(update, self)
861
861
 
@@ -410,7 +410,7 @@ class Methods(TDLibFunctions):
410
410
  return parse
411
411
  caption = parse
412
412
  else:
413
- caption = FormattedText(caption)
413
+ caption = FormattedText(text=caption)
414
414
 
415
415
  if isinstance(animation, str):
416
416
  animation = InputFileRemote(id=animation)
@@ -531,7 +531,7 @@ class Methods(TDLibFunctions):
531
531
  return parse
532
532
  caption = parse
533
533
  else:
534
- caption = FormattedText(caption)
534
+ caption = FormattedText(text=caption)
535
535
 
536
536
  if isinstance(audio, str):
537
537
  audio = InputFileRemote(id=audio)
@@ -641,7 +641,7 @@ class Methods(TDLibFunctions):
641
641
  return parse
642
642
  caption = parse
643
643
  else:
644
- caption = FormattedText(caption)
644
+ caption = FormattedText(text=caption)
645
645
 
646
646
  if isinstance(document, str):
647
647
  document = InputFileRemote(id=document)
@@ -864,7 +864,7 @@ class Methods(TDLibFunctions):
864
864
  return parse
865
865
  caption = parse
866
866
  else:
867
- caption = FormattedText(caption)
867
+ caption = FormattedText(text=caption)
868
868
 
869
869
  if isinstance(photo, str):
870
870
  photo = InputFileRemote(id=photo)
@@ -1,3 +1,4 @@
1
+ import json
1
2
  from base64 import b64encode
2
3
  from typing import Any
3
4
 
@@ -7,7 +8,7 @@ _type_cache: dict[str, type] = {}
7
8
 
8
9
 
9
10
  def obj_to_json(obj: Any, **kwargs: Any) -> str:
10
- return utils.json_dumps(obj_to_dict(obj), **kwargs)
11
+ return json.dumps(obj_to_dict(obj), **kwargs)
11
12
 
12
13
 
13
14
  def obj_to_dict(obj: Any) -> Any:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Pytdbot
3
- Version: 0.10.0.dev7
3
+ Version: 0.10.0.dev9
4
4
  Summary: Easy-to-use asynchronous TDLib wrapper for Python.
5
5
  Author-email: AYMEN A <let.me.code.safe@gmail.com>
6
6
  License-Expression: MIT
@@ -1,5 +1,5 @@
1
- pytdbot/__init__.py,sha256=XnND7rCUdHQBW_VCym9-ogvLoxdpmBtpKGkznVlqkDs,424
2
- pytdbot/client.py,sha256=c57DSHi2oH5Fx9HurQue5V2L3AANrFrliuV48FtDi6E,45940
1
+ pytdbot/__init__.py,sha256=oW5DThW6DXfL7j6qgGUYbdKY_8yfTYjHxRW57v8VqXo,424
2
+ pytdbot/client.py,sha256=jbgKfZBQwyoWnr8ltT0SQxdXH_D6kPbjoYKIaY8OnWc,45952
3
3
  pytdbot/client_manager.py,sha256=jWWosyRY57XAL8u2UmsE9ftpLHhJG8moJxeSIvVjgFs,6515
4
4
  pytdbot/filters.py,sha256=V6b09AGNVrw4ipgRMFYD9jJKAcNo9_WIJ-bSaGwSyf4,1549
5
5
  pytdbot/exception/__init__.py,sha256=KCO1OF5xjKz2k9nUMzSGUITva-Y1Mb4N54kE-MEtnsg,783
@@ -8,7 +8,7 @@ pytdbot/handlers/decorators.py,sha256=qZFeYbPMh07aLUtLfNnlenvz8x4Z33L48ASWC8mqEK
8
8
  pytdbot/handlers/handler.py,sha256=XILBjMhpwvPcVUssv2XP_tsoMlo9qjgqTvNHrftnOZI,1295
9
9
  pytdbot/handlers/td_updates.py,sha256=tlu9BKefvrOk09954iZsnxxEKh1Oio_N7xyC8oKkchw,385216
10
10
  pytdbot/methods/__init__.py,sha256=naVHl8-m9DU43Z_QUFYQOPes6NDz86JLWjb2l0q59ws,53
11
- pytdbot/methods/methods.py,sha256=lDXNkx3XFxmCtM8lqWU5bIZkcmU15OT8Oz3XbQCANCo,65398
11
+ pytdbot/methods/methods.py,sha256=ZcRH68P5w2Qzpk1r_JyhrUjwDLCuL0PF8d6dLuHQPmA,65418
12
12
  pytdbot/methods/td_functions.py,sha256=AyO4YqN-2g3D-CrZQWktcwhpQEfo5nV_CSv8Tw2LtIo,929512
13
13
  pytdbot/tdjson/__init__.py,sha256=8dDx6wH4IlUMQqvUrecAUafrY7-E2fvF6ZIYvuJmQ_A,50
14
14
  pytdbot/tdjson/tdjson.py,sha256=e-qEwqAl_DxnpowTp_Be2WwhEbvbx8eNAM6n7RKSKEw,5303
@@ -28,12 +28,12 @@ pytdbot/utils/__init__.py,sha256=ttnEmS35a_DiHCGFtExscZZB-KB4xWWv5o413PGtiDM,140
28
28
  pytdbot/utils/albums.py,sha256=xl8wzTju2Rim1uH0LjlsW1NxkKrstsZCD3oCWu-O_gE,513
29
29
  pytdbot/utils/escape.py,sha256=D5ZL3xBAMZDvAb_GLYk-nbk_H7RbnRcBsKt2NOOoC0o,1217
30
30
  pytdbot/utils/json_utils.py,sha256=YLZt5Jc5w-ZFaW5QHTwH-qdvtFUXOcWwp1-cMghCcNM,2217
31
- pytdbot/utils/obj_encoder.py,sha256=S1S_Ru7OIcSNpXZMSHRhPV6megxMfBiXq1_fb46tiRs,1427
31
+ pytdbot/utils/obj_encoder.py,sha256=TuAfx0xt3XOItSMwR6u4ufYqVzwM4exXqFzqVw6jcJo,1433
32
32
  pytdbot/utils/strings.py,sha256=NjTArf4zkOV3j2kerJfbA47lmuwZ20Xh_ppZ-pETQ0c,1203
33
33
  pytdbot/utils/text_format.py,sha256=g-PvtYr0dvltCa120IcEMff6LnBeI_F_6m7anYtEFaE,9762
34
34
  pytdbot/utils/webapps.py,sha256=qD8j3wpgAn2KgxEZMoh7k8FEom8JNiPN3rKweAS2lGw,2428
35
- pytdbot-0.10.0.dev7.dist-info/licenses/LICENSE,sha256=Y77J1RSAYfRz6kBjIWq81eWgLFQ_Su_b1l5rWthsHCM,1078
36
- pytdbot-0.10.0.dev7.dist-info/METADATA,sha256=bS6tsCEoPAtjl_rGSL5N0pXytX8W7nbefzfqD8uIv1I,11026
37
- pytdbot-0.10.0.dev7.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
38
- pytdbot-0.10.0.dev7.dist-info/top_level.txt,sha256=EkLKG-BZysNAC-td3TJQQAomlT6YsvKWwei1Pzk6Oqg,8
39
- pytdbot-0.10.0.dev7.dist-info/RECORD,,
35
+ pytdbot-0.10.0.dev9.dist-info/licenses/LICENSE,sha256=Y77J1RSAYfRz6kBjIWq81eWgLFQ_Su_b1l5rWthsHCM,1078
36
+ pytdbot-0.10.0.dev9.dist-info/METADATA,sha256=oDmblIQxZ1Hqis_0OdddX5_eaMwF1rHsn5A6IsZxbXA,11026
37
+ pytdbot-0.10.0.dev9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
38
+ pytdbot-0.10.0.dev9.dist-info/top_level.txt,sha256=EkLKG-BZysNAC-td3TJQQAomlT6YsvKWwei1Pzk6Oqg,8
39
+ pytdbot-0.10.0.dev9.dist-info/RECORD,,