amochka 0.4.0__py3-none-any.whl → 0.4.1__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.
amochka/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
2
  amochka: Библиотека для работы с API amoCRM.
3
3
  """
4
4
 
5
- __version__ = "0.4.0"
5
+ __version__ = "0.4.1"
6
6
 
7
7
  from .client import AmoCRMClient, CacheConfig
8
8
  from .errors import (
amochka/client.py CHANGED
@@ -1591,6 +1591,9 @@ class AmoCRMClient:
1591
1591
  notes = []
1592
1592
  while True:
1593
1593
  response = self._make_request("GET", endpoint, params=params)
1594
+ if not response:
1595
+ self.logger.warning(f"Empty response for notes {entity} {entity_id}, stopping pagination")
1596
+ break
1594
1597
  if response and "_embedded" in response and "notes" in response["_embedded"]:
1595
1598
  notes.extend(response["_embedded"]["notes"])
1596
1599
  if not get_all:
@@ -1670,6 +1673,9 @@ class AmoCRMClient:
1670
1673
  events = []
1671
1674
  while True:
1672
1675
  response = self._make_request("GET", "/api/v4/events", params=params)
1676
+ if not response:
1677
+ self.logger.warning(f"Empty response for events {entity} {entity_id}, stopping pagination")
1678
+ break
1673
1679
  if response and "_embedded" in response and "events" in response["_embedded"]:
1674
1680
  events.extend(response["_embedded"]["events"])
1675
1681
  # Если не нужно получать все страницы, выходим
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amochka
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Python library for working with amoCRM API with ETL capabilities
5
5
  Author-email: Timur <timurdt@gmail.com>
6
6
  License: MIT
@@ -1,5 +1,5 @@
1
- amochka/__init__.py,sha256=aF51XIVOetHHu7xVAe--atPb6LrGzDgRo8uSbJW2icg,925
2
- amochka/client.py,sha256=WFPlkBolKory7juyIYjqxFCw6QGN2Z7KSKlMd_KoLIY,87757
1
+ amochka/__init__.py,sha256=DCp7P4c3QzaaNHMoLYjSKLCGtOVFc6cjPQHHJmseYhg,925
2
+ amochka/client.py,sha256=4I31TqdMCsfyLpY9ChCLt46kcbdvt5ZvThOjVT371LQ,88074
3
3
  amochka/errors.py,sha256=Rg4U9srjboQwgU3wwhAed0p3vGcc0ZhuyKHIDhYFnp8,1371
4
4
  amochka/etl.py,sha256=N8rXNFbtmlKfsYpgr7HDcP4enoj63XQPWuTDxGuMhw4,8901
5
5
  etl/__init__.py,sha256=bp9fPqbKlOc7xzs27diHEvysy1FgBrwlpX6GnR6GL9U,255
@@ -9,7 +9,7 @@ etl/loaders.py,sha256=x8PcDQoq2kjbd52H2VzKKz5vHzyD6DXSsb9X0foPX_U,31941
9
9
  etl/run_etl.py,sha256=LxKQLE_yUPkg7kaFmmMxrdggz27puS1VdV9NTna9e4Q,26665
10
10
  etl/transformers.py,sha256=OwYJ_9l3oqvy2Y3-umXjAGweOIqlfRI0iSiCFPrcQ8E,17867
11
11
  etl/migrations/001_create_tables.sql,sha256=YrSaZjpofC1smjYx0bM4eHQumboruIBY3fwRDlJLLSo,15749
12
- amochka-0.4.0.dist-info/METADATA,sha256=c9I25LoMxn4pI0pLFAIKw3qG992_9nl5YQmLSynK-LA,7530
13
- amochka-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- amochka-0.4.0.dist-info/top_level.txt,sha256=grRX8aLFG-yYKPsAqCD6sUBmdLSQeOMHsc9Dl6S7Lzo,12
15
- amochka-0.4.0.dist-info/RECORD,,
12
+ amochka-0.4.1.dist-info/METADATA,sha256=93mKBER-Qy5owT9K_NrxUAxflstfPaMKgq6Zw-ZZjXc,7530
13
+ amochka-0.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ amochka-0.4.1.dist-info/top_level.txt,sha256=grRX8aLFG-yYKPsAqCD6sUBmdLSQeOMHsc9Dl6S7Lzo,12
15
+ amochka-0.4.1.dist-info/RECORD,,