maxbot-api-client-python 1.2.0__py3-none-any.whl → 1.2.2__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.
@@ -1,5 +1,4 @@
1
- import aiofiles, asyncio, httpx, logging, mimetypes, os, time, re
2
- from aiofiles import tempfile
1
+ import aiofiles, asyncio, httpx, logging, mimetypes, os, tempfile, time, re
3
2
  from typing import Any, List, Optional
4
3
  from urllib.parse import urlparse
5
4
  from pathlib import Path
@@ -151,7 +150,7 @@ class Helpers:
151
150
  finally:
152
151
  if temp_path and os.path.exists(temp_path):
153
152
  try:
154
- await aiofiles.os.remove(temp_path)
153
+ os.remove(temp_path)
155
154
  except OSError as e:
156
155
  logger.error(f"Failed to cleanup temp file: {e}")
157
156
 
@@ -271,9 +270,8 @@ class Helpers:
271
270
  else:
272
271
  filename = url_path_name if "." in url_path_name else f"{url_path_name}{extension}"
273
272
 
274
- temp_file = tempfile.NamedTemporaryFile(prefix="temp_", suffix=f"_{os.path.basename(filename)}", delete=False)
275
- temp_path = temp_file.name
276
- temp_file.close()
273
+ fd, temp_path = tempfile.mkstemp(prefix="temp_", suffix=f"_{os.path.basename(filename)}")
274
+ os.close(fd)
277
275
 
278
276
  async with aiofiles.open(temp_path, "wb") as f:
279
277
  async for chunk in resp.aiter_bytes(chunk_size=8192):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maxbot-api-client-python
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Python client for MAX Bot API with Sync and Async support
5
5
  Author: Green API
6
6
  Project-URL: Homepage, https://github.com/green-api/maxbot-api-client-python
@@ -6,15 +6,15 @@ maxbot_api_client_python/utils.py,sha256=wrLUoAtPfjNm0qUGdnNlYO0hlH6-7skIqAkkDWj
6
6
  maxbot_api_client_python/tools/__init__.py,sha256=lLqETrmRcsRJe8B-hkDAdnWhdM6zWboWpKMZt-2w6Q8,444
7
7
  maxbot_api_client_python/tools/bots.py,sha256=838CY2MVKgv5VcUtBeiCPKkNL1nBxSjxuK-HdAV29_0,1839
8
8
  maxbot_api_client_python/tools/chats.py,sha256=8yGO8MILGTY-Zw8Ab9jI7MI_W1Aya37mDC30iMOIIgc,17930
9
- maxbot_api_client_python/tools/helpers.py,sha256=QBX6oYsylCB_L9dQMLyo9-PcQllcTyB5C7_r2YW8EjA,12028
9
+ maxbot_api_client_python/tools/helpers.py,sha256=vHrvxTCX8vb98gDiMS-nxV_7wP1sG4-wgjQdIOu0qv8,11922
10
10
  maxbot_api_client_python/tools/messages.py,sha256=QI8vXaPuaO5_K9Ev4wiJ9jXWR9G42x_iUBl2ENtCFx4,8226
11
11
  maxbot_api_client_python/tools/subscriptions.py,sha256=GO6ofiYgsAVGaDdIe89cteJePes96raI29_YIAZwE0Y,4216
12
12
  maxbot_api_client_python/tools/uploads.py,sha256=9hBbXQefBhetDGFzhDQAYofREpUPWop0Pjapu___NpY,5219
13
13
  maxbot_api_client_python/types/__init__.py,sha256=_dVz7V3v-O6pYdrWlXgJfNsMQZhq6j-N8j7UecPyaQ0,140
14
14
  maxbot_api_client_python/types/constants.py,sha256=ysUJy90tx8UFY7QWp_KCcELlb1DszCpVachanEAF30w,2935
15
15
  maxbot_api_client_python/types/models.py,sha256=0-YQPLF9hU689tf3Z3oql2ggHWJ0uUepc3bJyNFilh0,16113
16
- maxbot_api_client_python-1.2.0.dist-info/licenses/LICENSE,sha256=v1Mdo-KDvHFJnCaCcCPm4pR4JiovXR-v1BcS2YCvFLg,1085
17
- maxbot_api_client_python-1.2.0.dist-info/METADATA,sha256=FHDKIBQSzAQAW8CcoFM9wM-KGR7hgZixDrAwSA3A8Y0,19462
18
- maxbot_api_client_python-1.2.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
19
- maxbot_api_client_python-1.2.0.dist-info/top_level.txt,sha256=o06jXmPodox_bJjiNcOS6ydGU754_BakTaSYFQihSiQ,25
20
- maxbot_api_client_python-1.2.0.dist-info/RECORD,,
16
+ maxbot_api_client_python-1.2.2.dist-info/licenses/LICENSE,sha256=v1Mdo-KDvHFJnCaCcCPm4pR4JiovXR-v1BcS2YCvFLg,1085
17
+ maxbot_api_client_python-1.2.2.dist-info/METADATA,sha256=O1AHHRcU9wSfJBPUqnERp3E_1z3KoIjVERhCym_N3uY,19462
18
+ maxbot_api_client_python-1.2.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
19
+ maxbot_api_client_python-1.2.2.dist-info/top_level.txt,sha256=o06jXmPodox_bJjiNcOS6ydGU754_BakTaSYFQihSiQ,25
20
+ maxbot_api_client_python-1.2.2.dist-info/RECORD,,