Pytdbot 0.9.0.dev5__tar.gz → 0.9.0.dev7__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 (42) hide show
  1. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/LICENSE +1 -1
  2. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/PKG-INFO +44 -15
  3. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/Pytdbot.egg-info/PKG-INFO +44 -15
  4. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/Pytdbot.egg-info/requires.txt +3 -0
  5. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/README.md +26 -11
  6. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/__init__.py +2 -2
  7. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/client.py +67 -104
  8. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/methods/methods.py +0 -65
  9. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/methods/td_functions.py +435 -96
  10. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/tdjson/tdjson.py +59 -36
  11. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/__init__.py +85 -9
  12. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/bound_methods/callback_query.py +10 -0
  13. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/bound_methods/message.py +47 -21
  14. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/types.py +2168 -224
  15. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/utils/__init__.py +9 -1
  16. pytdbot-0.9.0.dev7/pytdbot/utils/json_utils.py +27 -0
  17. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/utils/strings.py +19 -0
  18. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/setup.py +4 -1
  19. pytdbot-0.9.0.dev5/pytdbot/utils/json_utils.py +0 -23
  20. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/MANIFEST.in +0 -0
  21. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/Pytdbot.egg-info/SOURCES.txt +0 -0
  22. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/Pytdbot.egg-info/dependency_links.txt +0 -0
  23. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/Pytdbot.egg-info/top_level.txt +0 -0
  24. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/exception/__init__.py +0 -0
  25. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/filters.py +0 -0
  26. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/handlers/__init__.py +0 -0
  27. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/handlers/decorators.py +0 -0
  28. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/handlers/handler.py +0 -0
  29. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/handlers/td_updates.py +0 -0
  30. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/methods/__init__.py +0 -0
  31. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/tdjson/__init__.py +0 -0
  32. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/plugins/__init__.py +0 -0
  33. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/__init__.py +0 -0
  34. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/bound_methods/__init__.py +0 -0
  35. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/bound_methods/chatActions.py +0 -0
  36. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/types/td_types/bound_methods/file.py +0 -0
  37. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/utils/escape.py +0 -0
  38. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/utils/obj_encoder.py +0 -0
  39. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/utils/text_format.py +0 -0
  40. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/pytdbot/utils/webapps.py +0 -0
  41. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/requirements.txt +0 -0
  42. {pytdbot-0.9.0.dev5 → pytdbot-0.9.0.dev7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022-2024 Python TDLib
3
+ Copyright (c) 2022-2025 Pytdbot, AYMENJD
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: Pytdbot
3
- Version: 0.9.0.dev5
3
+ Version: 0.9.0.dev7
4
4
  Summary: Easy-to-use asynchronous TDLib wrapper for Python.
5
5
  Home-page: https://github.com/pytdbot/client
6
6
  Author: AYMEN Mohammed
@@ -14,14 +14,28 @@ Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: deepdiff
16
16
  Requires-Dist: aio-pika
17
-
18
- # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.41-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot)
19
-
20
- Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
17
+ Provides-Extra: tdjson
18
+ Requires-Dist: tdjson; extra == "tdjson"
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: keywords
25
+ Dynamic: license
26
+ Dynamic: project-url
27
+ Dynamic: provides-extra
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.44-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot)
33
+
34
+ Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
21
35
 
22
36
  ### Features
23
37
 
24
- ``Pytdbot`` offers numerous advantages, including:
38
+ `Pytdbot` offers numerous advantages, including:
25
39
 
26
40
  - **Easy to Use**: Designed with simplicity in mind, making it accessible for developers
27
41
  - **Performance**: Fast and powerful, making it ready to fight
@@ -32,30 +46,42 @@ Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/t
32
46
  - **Bound Methods**: Features types bound methods for improved usability
33
47
  - **Unlimited Support**: Supports **Plugins**, [**filters**](pytdbot/filters.py#L23), [**TDLib**](https://github.com/tdlib/td) types/functions and much more
34
48
 
35
-
36
-
37
49
  ### Requirements
38
50
 
39
51
  - Python 3.9+
40
52
  - Telegram [API key](https://my.telegram.org/apps)
41
- - [tdjson](https://github.com/tdlib/td#building)
53
+ - [tdjson](https://github.com/AYMENJD/tdjson) or [TDLib](https://github.com/tdlib/td#building)
42
54
  - [deepdiff](https://github.com/seperman/deepdiff)
43
55
  - [aio-pika](https://github.com/mosquito/aio-pika)
44
56
 
45
57
  ### Installation
58
+
46
59
  > For better performance, it's recommended to install [orjson](https://github.com/ijl/orjson#install) or [ujson](https://github.com/ultrajson/ultrajson#ultrajson).
47
60
 
48
- You can install Pytdbot using pip:
61
+ You can install Pytdbot with TDLib included using pip:
62
+
63
+ ```bash
64
+ pip install pytdbot[tdjson]
65
+ ```
66
+
67
+ or without **pre-built** TDLib:
68
+
49
69
  ```bash
50
70
  pip install pytdbot
51
71
  ```
52
- To install the development version from Github, use the following command:
72
+
73
+ If the install fails, then you need to build TDLib from [source](https://github.com/tdlib/td#building) and pass it to `Client(lib_path="/path/to/libtdjson")`.
74
+
75
+ You could also install the development version from Github, using the following command:
76
+
53
77
  ```bash
54
- pip install git+https://github.com/pytdbot/client.git
78
+ pip install --pre pytdbot
55
79
  ```
56
80
 
57
81
  ### Examples
82
+
58
83
  Basic example:
84
+
59
85
  ```python
60
86
 
61
87
  import asyncio
@@ -64,8 +90,8 @@ from pytdbot import Client, types
64
90
 
65
91
  client = Client(
66
92
  token="1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI", # Your bot token or phone number if you want to login as user
67
- api_id=0,
68
- api_hash="API_HASH",
93
+ api_id=0,
94
+ api_hash="API_HASH",
69
95
  lib_path="/path/to/libtdjson.so", # Path to TDjson shared library
70
96
  files_directory="BotDB", # Path where to store TDLib files
71
97
  database_encryption_key="1234echobot$",
@@ -94,12 +120,15 @@ async def say_hello(c: Client, message: types.Message):
94
120
  client.run()
95
121
 
96
122
  ```
123
+
97
124
  For more examples, check the [examples](https://github.com/pytdbot/client/tree/main/examples) folder.
98
125
 
99
126
  # Thanks to
127
+
100
128
  - You for viewing or using this project.
101
129
 
102
130
  - [@levlam](https://github.com/levlam) for maintaining [TDLib](https://github.com/tdlib/td) and for the help to create [Pytdbot](https://github.com/pytdbot/client).
131
+
103
132
  # License
104
133
 
105
134
  MIT [License](https://github.com/pytdbot/client/blob/main/LICENSE)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: Pytdbot
3
- Version: 0.9.0.dev5
3
+ Version: 0.9.0.dev7
4
4
  Summary: Easy-to-use asynchronous TDLib wrapper for Python.
5
5
  Home-page: https://github.com/pytdbot/client
6
6
  Author: AYMEN Mohammed
@@ -14,14 +14,28 @@ Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: deepdiff
16
16
  Requires-Dist: aio-pika
17
-
18
- # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.41-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot)
19
-
20
- Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
17
+ Provides-Extra: tdjson
18
+ Requires-Dist: tdjson; extra == "tdjson"
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: keywords
25
+ Dynamic: license
26
+ Dynamic: project-url
27
+ Dynamic: provides-extra
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.44-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot)
33
+
34
+ Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
21
35
 
22
36
  ### Features
23
37
 
24
- ``Pytdbot`` offers numerous advantages, including:
38
+ `Pytdbot` offers numerous advantages, including:
25
39
 
26
40
  - **Easy to Use**: Designed with simplicity in mind, making it accessible for developers
27
41
  - **Performance**: Fast and powerful, making it ready to fight
@@ -32,30 +46,42 @@ Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/t
32
46
  - **Bound Methods**: Features types bound methods for improved usability
33
47
  - **Unlimited Support**: Supports **Plugins**, [**filters**](pytdbot/filters.py#L23), [**TDLib**](https://github.com/tdlib/td) types/functions and much more
34
48
 
35
-
36
-
37
49
  ### Requirements
38
50
 
39
51
  - Python 3.9+
40
52
  - Telegram [API key](https://my.telegram.org/apps)
41
- - [tdjson](https://github.com/tdlib/td#building)
53
+ - [tdjson](https://github.com/AYMENJD/tdjson) or [TDLib](https://github.com/tdlib/td#building)
42
54
  - [deepdiff](https://github.com/seperman/deepdiff)
43
55
  - [aio-pika](https://github.com/mosquito/aio-pika)
44
56
 
45
57
  ### Installation
58
+
46
59
  > For better performance, it's recommended to install [orjson](https://github.com/ijl/orjson#install) or [ujson](https://github.com/ultrajson/ultrajson#ultrajson).
47
60
 
48
- You can install Pytdbot using pip:
61
+ You can install Pytdbot with TDLib included using pip:
62
+
63
+ ```bash
64
+ pip install pytdbot[tdjson]
65
+ ```
66
+
67
+ or without **pre-built** TDLib:
68
+
49
69
  ```bash
50
70
  pip install pytdbot
51
71
  ```
52
- To install the development version from Github, use the following command:
72
+
73
+ If the install fails, then you need to build TDLib from [source](https://github.com/tdlib/td#building) and pass it to `Client(lib_path="/path/to/libtdjson")`.
74
+
75
+ You could also install the development version from Github, using the following command:
76
+
53
77
  ```bash
54
- pip install git+https://github.com/pytdbot/client.git
78
+ pip install --pre pytdbot
55
79
  ```
56
80
 
57
81
  ### Examples
82
+
58
83
  Basic example:
84
+
59
85
  ```python
60
86
 
61
87
  import asyncio
@@ -64,8 +90,8 @@ from pytdbot import Client, types
64
90
 
65
91
  client = Client(
66
92
  token="1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI", # Your bot token or phone number if you want to login as user
67
- api_id=0,
68
- api_hash="API_HASH",
93
+ api_id=0,
94
+ api_hash="API_HASH",
69
95
  lib_path="/path/to/libtdjson.so", # Path to TDjson shared library
70
96
  files_directory="BotDB", # Path where to store TDLib files
71
97
  database_encryption_key="1234echobot$",
@@ -94,12 +120,15 @@ async def say_hello(c: Client, message: types.Message):
94
120
  client.run()
95
121
 
96
122
  ```
123
+
97
124
  For more examples, check the [examples](https://github.com/pytdbot/client/tree/main/examples) folder.
98
125
 
99
126
  # Thanks to
127
+
100
128
  - You for viewing or using this project.
101
129
 
102
130
  - [@levlam](https://github.com/levlam) for maintaining [TDLib](https://github.com/tdlib/td) and for the help to create [Pytdbot](https://github.com/pytdbot/client).
131
+
103
132
  # License
104
133
 
105
134
  MIT [License](https://github.com/pytdbot/client/blob/main/LICENSE)
@@ -1,2 +1,5 @@
1
1
  deepdiff
2
2
  aio-pika
3
+
4
+ [tdjson]
5
+ tdjson
@@ -1,10 +1,10 @@
1
- # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.41-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot)
1
+ # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.44-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot)
2
2
 
3
- Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
3
+ Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
4
4
 
5
5
  ### Features
6
6
 
7
- ``Pytdbot`` offers numerous advantages, including:
7
+ `Pytdbot` offers numerous advantages, including:
8
8
 
9
9
  - **Easy to Use**: Designed with simplicity in mind, making it accessible for developers
10
10
  - **Performance**: Fast and powerful, making it ready to fight
@@ -15,30 +15,42 @@ Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/t
15
15
  - **Bound Methods**: Features types bound methods for improved usability
16
16
  - **Unlimited Support**: Supports **Plugins**, [**filters**](pytdbot/filters.py#L23), [**TDLib**](https://github.com/tdlib/td) types/functions and much more
17
17
 
18
-
19
-
20
18
  ### Requirements
21
19
 
22
20
  - Python 3.9+
23
21
  - Telegram [API key](https://my.telegram.org/apps)
24
- - [tdjson](https://github.com/tdlib/td#building)
22
+ - [tdjson](https://github.com/AYMENJD/tdjson) or [TDLib](https://github.com/tdlib/td#building)
25
23
  - [deepdiff](https://github.com/seperman/deepdiff)
26
24
  - [aio-pika](https://github.com/mosquito/aio-pika)
27
25
 
28
26
  ### Installation
27
+
29
28
  > For better performance, it's recommended to install [orjson](https://github.com/ijl/orjson#install) or [ujson](https://github.com/ultrajson/ultrajson#ultrajson).
30
29
 
31
- You can install Pytdbot using pip:
30
+ You can install Pytdbot with TDLib included using pip:
31
+
32
+ ```bash
33
+ pip install pytdbot[tdjson]
34
+ ```
35
+
36
+ or without **pre-built** TDLib:
37
+
32
38
  ```bash
33
39
  pip install pytdbot
34
40
  ```
35
- To install the development version from Github, use the following command:
41
+
42
+ If the install fails, then you need to build TDLib from [source](https://github.com/tdlib/td#building) and pass it to `Client(lib_path="/path/to/libtdjson")`.
43
+
44
+ You could also install the development version from Github, using the following command:
45
+
36
46
  ```bash
37
- pip install git+https://github.com/pytdbot/client.git
47
+ pip install --pre pytdbot
38
48
  ```
39
49
 
40
50
  ### Examples
51
+
41
52
  Basic example:
53
+
42
54
  ```python
43
55
 
44
56
  import asyncio
@@ -47,8 +59,8 @@ from pytdbot import Client, types
47
59
 
48
60
  client = Client(
49
61
  token="1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI", # Your bot token or phone number if you want to login as user
50
- api_id=0,
51
- api_hash="API_HASH",
62
+ api_id=0,
63
+ api_hash="API_HASH",
52
64
  lib_path="/path/to/libtdjson.so", # Path to TDjson shared library
53
65
  files_directory="BotDB", # Path where to store TDLib files
54
66
  database_encryption_key="1234echobot$",
@@ -77,12 +89,15 @@ async def say_hello(c: Client, message: types.Message):
77
89
  client.run()
78
90
 
79
91
  ```
92
+
80
93
  For more examples, check the [examples](https://github.com/pytdbot/client/tree/main/examples) folder.
81
94
 
82
95
  # Thanks to
96
+
83
97
  - You for viewing or using this project.
84
98
 
85
99
  - [@levlam](https://github.com/levlam) for maintaining [TDLib](https://github.com/tdlib/td) and for the help to create [Pytdbot](https://github.com/pytdbot/client).
100
+
86
101
  # License
87
102
 
88
103
  MIT [License](https://github.com/pytdbot/client/blob/main/LICENSE)
@@ -4,8 +4,8 @@ from .client import Client
4
4
 
5
5
  __all__ = ["types", "utils", "filters", "exception", "TdJson", "Client"]
6
6
 
7
- __version__ = "0.9.0dev5"
8
- __copyright__ = "Copyright (c) 2022-2024 AYMEN Mohammed ~ https://github.com/AYMENJD"
7
+ __version__ = "0.9.0dev7"
8
+ __copyright__ = "Copyright (c) 2022-2025 Pytdbot, AYMENJD"
9
9
  __license__ = "MIT License"
10
10
 
11
11
  VERSION = __version__