multibotkit 0.1.17__py3-none-any.whl → 0.1.19__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.
@@ -28,7 +28,7 @@ from multibotkit.schemas.telegram.outgoing import (
28
28
  ReplyKeyboardRemove,
29
29
  Sticker,
30
30
  Video,
31
- Location,
31
+ Location, DeleteWebhookParams,
32
32
  )
33
33
 
34
34
 
@@ -69,6 +69,20 @@ class TelegramHelper(BaseHelper):
69
69
  r = await self._perform_async_request(url, data)
70
70
  return r
71
71
 
72
+ def sync_delete_webhook(self, drop_pending_updates: Optional[bool] = False):
73
+ url = self.tg_base_url + "deleteWebhook"
74
+ params = DeleteWebhookParams(drop_pending_updates=drop_pending_updates)
75
+ data = params.dict(exclude_none=True)
76
+ r = self._perform_sync_request(url, data)
77
+ return r
78
+
79
+ async def async_delete_webhook(self, drop_pending_updates: Optional[bool] = False):
80
+ url = self.tg_base_url + "deleteWebhook"
81
+ params = DeleteWebhookParams(drop_pending_updates=drop_pending_updates)
82
+ data = params.dict(exclude_none=True)
83
+ r = await self._perform_async_request(url, data)
84
+ return r
85
+
72
86
  def sync_send_locations(
73
87
  self,
74
88
  chat_id: int,
@@ -32,6 +32,10 @@ updates may be received for a short period of time.",
32
32
  )
33
33
 
34
34
 
35
+ class DeleteWebhookParams(BaseModel):
36
+ drop_pending_updates: Optional[bool] = Field(None, title="Pass True to drop all pending updates")
37
+
38
+
35
39
  class WebhookInfo(BaseModel):
36
40
  url: str = Field(..., title="Webhook URL, may be empty if webhook is not set up")
37
41
  has_custom_certificate: Optional[bool] = Field(
@@ -1,7 +1,7 @@
1
1
  import json
2
2
  from typing import Optional
3
3
 
4
- import aioredis
4
+ from redis import asyncio as aioredis
5
5
 
6
6
  from multibotkit.states.managers.base import BaseStateManager
7
7
  from multibotkit.states.state import State
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.17
3
+ Version: 0.1.19
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -9,7 +9,7 @@ Classifier: Intended Audience :: Developers
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
12
+ Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: httpx >=0.23.0
@@ -19,7 +19,7 @@ Requires-Dist: aiofiles >=22.1.0
19
19
  Provides-Extra: mongo
20
20
  Requires-Dist: motor >=3.0.0 ; extra == 'mongo'
21
21
  Provides-Extra: redis
22
- Requires-Dist: aioredis >=2.0.1 ; extra == 'redis'
22
+ Requires-Dist: redis >=4.6.0 ; extra == 'redis'
23
23
 
24
24
  # multibotkit
25
25
  Functional library for developing multiplatform chatbots
@@ -8,7 +8,7 @@ multibotkit/dispatchers/vk.py,sha256=EsFOL2g3ju-nhsdyRY4JBTJxqQPmaPAB7Mkn462s4tk
8
8
  multibotkit/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  multibotkit/helpers/base_helper.py,sha256=b4vlmwELwGUIJE0DvD2Lkk0LO-b-w0VWAnEnnYawOKQ,1462
10
10
  multibotkit/helpers/fb.py,sha256=Z2Vo6A_fepVBQNcWCeelmH72zf_eKyXOXheUIlaIiBI,4329
11
- multibotkit/helpers/telegram.py,sha256=vk2VjAOFSJSXfwGlhgi-7JgIeq6Z9hWKkWMPWiBR8hc,52505
11
+ multibotkit/helpers/telegram.py,sha256=FVwH5anoJ2n-hcGiSiznGKB_2rhJDaUjtYbTGiPmKQ8,53188
12
12
  multibotkit/helpers/viber.py,sha256=74UQ3RtHS3iR8qA5XVeMOYfXaaMq2pF0cpItwehdr4o,9246
13
13
  multibotkit/helpers/vk.py,sha256=QlI9rGEjhzqS-jcFrnZJ651lDbC4m33SSHAC1zWDyUU,5930
14
14
  multibotkit/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -17,7 +17,7 @@ multibotkit/schemas/fb/incoming.py,sha256=sp4CeQohaDMOxz113dNxJDv_fSaGW5i8qzVS7F
17
17
  multibotkit/schemas/fb/outgoing.py,sha256=Qm0gPHHipAolXpnOJC4J4bfYjQEWpX54vYygSwKtIV4,8036
18
18
  multibotkit/schemas/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  multibotkit/schemas/telegram/incoming.py,sha256=ba67RQT5phOEIWTMG72SomUQrdxiuoKlXOxiz5fiaeA,10881
20
- multibotkit/schemas/telegram/outgoing.py,sha256=hCQP7UKRfSh-hX6F5KDfZwxWItBkOWCo5zHRVtIYECk,11569
20
+ multibotkit/schemas/telegram/outgoing.py,sha256=9BGRAOQIaQWxL8lJ3_0WUN2N5GVZjlvBSO5EcqwxRDU,11711
21
21
  multibotkit/schemas/viber/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  multibotkit/schemas/viber/incoming.py,sha256=0sS9g-NmQFl_uoVz8pkbQ9zdNsXvGE52KxmzADoFIRM,4193
23
23
  multibotkit/schemas/viber/outgoing.py,sha256=KI73IX-aawtAx3ejW2Hx0ivXBYuMVudUxhwyp1wv6rc,8252
@@ -30,9 +30,9 @@ multibotkit/states/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
30
30
  multibotkit/states/managers/base.py,sha256=KOO-wtbj984-lLq6u6LhxR79NTftQV2c5uUG6BQ9Ajs,489
31
31
  multibotkit/states/managers/memory.py,sha256=uN064uj2Q0ivK9LGEHJFaaaG6FEyXkIajS87TCAuYsI,1328
32
32
  multibotkit/states/managers/mongo.py,sha256=K8upbLT0892YA2Qi9dDPXDP5jvQoS16T8FW-qapv1Xk,1927
33
- multibotkit/states/managers/redis.py,sha256=C9HTjfVvttzOizycprWHd2C86DfKqd2Nyq5-5CqQNDI,1659
34
- multibotkit-0.1.17.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
- multibotkit-0.1.17.dist-info/METADATA,sha256=Ri9Ycn2xmQUzY96Hljk5ILCHuA_WegZOM9J9IKcS-4Q,837
36
- multibotkit-0.1.17.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
37
- multibotkit-0.1.17.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
- multibotkit-0.1.17.dist-info/RECORD,,
33
+ multibotkit/states/managers/redis.py,sha256=XMpQ8LUdO9mZq3cZXlYOcGCC0VsSbsxBsEzVFH7TeEM,1681
34
+ multibotkit-0.1.19.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
+ multibotkit-0.1.19.dist-info/METADATA,sha256=X7eQQVuoi9O0EAWhqiNqmRSalDULVbDJWdB33iTvqe8,834
36
+ multibotkit-0.1.19.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
37
+ multibotkit-0.1.19.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
+ multibotkit-0.1.19.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5