Pytdbot 0.10.0.dev6__py3-none-any.whl → 0.10.0.dev7__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.dev6"
16
+ __version__ = "0.10.0.dev7"
17
17
  __copyright__ = "Copyright (c) 2022-2026 Pytdbot, AYMENJD"
18
18
  __license__ = "MIT License"
19
19
 
@@ -1,4 +1,3 @@
1
- import json
2
1
  from base64 import b64encode
3
2
  from typing import Any
4
3
 
@@ -8,7 +7,7 @@ _type_cache: dict[str, type] = {}
8
7
 
9
8
 
10
9
  def obj_to_json(obj: Any, **kwargs: Any) -> str:
11
- return json.dumps(obj_to_dict(obj), **kwargs)
10
+ return utils.json_dumps(obj_to_dict(obj), **kwargs)
12
11
 
13
12
 
14
13
  def obj_to_dict(obj: Any) -> Any:
@@ -26,8 +25,7 @@ def obj_to_dict(obj: Any) -> Any:
26
25
 
27
26
  def dict_to_obj(dict_obj: Any, client: Any = None) -> Any:
28
27
  if isinstance(dict_obj, dict):
29
- if "@type" in dict_obj:
30
- td_type = dict_obj["@type"]
28
+ if td_type := dict_obj.get("@type"):
31
29
  obj_type = _type_cache.get(td_type)
32
30
  if obj_type is None:
33
31
  obj_type = getattr(types, utils.to_camel_case(td_type))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Pytdbot
3
- Version: 0.10.0.dev6
3
+ Version: 0.10.0.dev7
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,4 +1,4 @@
1
- pytdbot/__init__.py,sha256=fAOXY9Ym3mogUkdcHUqriTb9-7a0Dqak2bS7-YzDFbU,424
1
+ pytdbot/__init__.py,sha256=XnND7rCUdHQBW_VCym9-ogvLoxdpmBtpKGkznVlqkDs,424
2
2
  pytdbot/client.py,sha256=c57DSHi2oH5Fx9HurQue5V2L3AANrFrliuV48FtDi6E,45940
3
3
  pytdbot/client_manager.py,sha256=jWWosyRY57XAL8u2UmsE9ftpLHhJG8moJxeSIvVjgFs,6515
4
4
  pytdbot/filters.py,sha256=V6b09AGNVrw4ipgRMFYD9jJKAcNo9_WIJ-bSaGwSyf4,1549
@@ -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=NeZxXQlj4cUMvfa1kFT1516xz4sgKOHexYbGVJSQAbM,1460
31
+ pytdbot/utils/obj_encoder.py,sha256=S1S_Ru7OIcSNpXZMSHRhPV6megxMfBiXq1_fb46tiRs,1427
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.dev6.dist-info/licenses/LICENSE,sha256=Y77J1RSAYfRz6kBjIWq81eWgLFQ_Su_b1l5rWthsHCM,1078
36
- pytdbot-0.10.0.dev6.dist-info/METADATA,sha256=r1Rg4h4SjTkxWVL9M_-7msCEuu-RmRJVDCBM3SLN6dA,11026
37
- pytdbot-0.10.0.dev6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
38
- pytdbot-0.10.0.dev6.dist-info/top_level.txt,sha256=EkLKG-BZysNAC-td3TJQQAomlT6YsvKWwei1Pzk6Oqg,8
39
- pytdbot-0.10.0.dev6.dist-info/RECORD,,
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,,