arpakitlib 1.8.49__py3-none-any.whl → 1.8.51__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.
@@ -78,7 +78,7 @@ class ZabbixApiClient:
78
78
  kwargs["sortorder"] = "DESC"
79
79
  return [host_id["hostid"] for host_id in host_ids]
80
80
 
81
- def get_hosts(self, *, host_ids: Optional[list[str]] = None) -> list[dict[str, Any]]:
81
+ def get_hosts(self, *, host_ids: Optional[list[str | int]] = None) -> list[dict[str, Any]]:
82
82
  kwargs = {
83
83
  "output": "extend",
84
84
  "selectInterfaces": "extend",
@@ -93,6 +93,8 @@ class ZabbixApiClient:
93
93
 
94
94
  self.login_if_not_logged_in()
95
95
  hosts = self.zabbix_api.host.get(**kwargs)
96
+ for d in hosts:
97
+ d["hostid_int"] = int(d["hostid"])
96
98
 
97
99
  return hosts
98
100
 
@@ -116,7 +118,7 @@ class ZabbixApiClient:
116
118
  def get_item_ids(
117
119
  self,
118
120
  *,
119
- host_ids: Optional[list[str]] = None,
121
+ host_ids: Optional[list[str | int]] = None,
120
122
  keys: Optional[list[str]] = None,
121
123
  names: Optional[list[str]] = None,
122
124
  limit: Optional[int] = None
@@ -148,8 +150,8 @@ class ZabbixApiClient:
148
150
  def get_items(
149
151
  self,
150
152
  *,
151
- host_ids: Optional[list[str]] = None,
152
- item_ids: Optional[list[str]] = None,
153
+ host_ids: Optional[list[str | int]] = None,
154
+ item_ids: Optional[list[str | int]] = None,
153
155
  keys: Optional[list[str]] = None,
154
156
  names: Optional[list[str]] = None,
155
157
  limit: Optional[int] = None
@@ -180,12 +182,14 @@ class ZabbixApiClient:
180
182
  kwargs["sortorder"] = "DESC"
181
183
  self.login_if_not_logged_in()
182
184
  res = self.zabbix_api.item.get(**kwargs)
185
+ for d in res:
186
+ d["itemid_int"] = int(d["itemid"])
183
187
  return res
184
188
 
185
189
  def iter_all_items(
186
190
  self,
187
191
  *,
188
- host_ids: Optional[list[str]] = None,
192
+ host_ids: Optional[list[str | int]] = None,
189
193
  keys: Optional[list[str]] = None,
190
194
  names: Optional[list[str]] = None
191
195
  ) -> Iterator[list[dict[str, Any]]]:
@@ -200,7 +204,7 @@ class ZabbixApiClient:
200
204
  def iter_all_items_by_one(
201
205
  self,
202
206
  *,
203
- host_ids: Optional[list[str]] = None,
207
+ host_ids: Optional[list[str | int]] = None,
204
208
  keys: Optional[list[str]] = None,
205
209
  names: Optional[list[str]] = None
206
210
  ) -> Iterator[dict[str, Any]]:
@@ -211,7 +215,7 @@ class ZabbixApiClient:
211
215
  def get_all_items(
212
216
  self,
213
217
  *,
214
- host_ids: list[str] | None = None,
218
+ host_ids: list[str | int] | None = None,
215
219
  keys: list[str] | None = None,
216
220
  names: list[str] | None = None
217
221
  ) -> list[dict[str, Any]]:
@@ -223,8 +227,8 @@ class ZabbixApiClient:
223
227
  def get_histories(
224
228
  self,
225
229
  *,
226
- host_ids: Optional[list[str]] = None,
227
- item_ids: Optional[list[str]] = None,
230
+ host_ids: Optional[list[str | int]] = None,
231
+ item_ids: Optional[list[str | int]] = None,
228
232
  limit: Optional[int] = None,
229
233
  history: int = 0,
230
234
  time_from: Optional[datetime] = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arpakitlib
3
- Version: 1.8.49
3
+ Version: 1.8.51
4
4
  Summary: arpakitlib
5
5
  License: Apache-2.0
6
6
  Keywords: arpakitlib,arpakit,arpakit-company,arpakitcompany,arpakit_company
@@ -368,9 +368,9 @@ arpakitlib/ar_str_util.py,sha256=QWlXMYgGOh_m0uXwUywF9R6g_zJ0Rh9YSfU_eVzPh7g,420
368
368
  arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
369
369
  arpakitlib/ar_wata_api_client.py,sha256=gdHOqDbuqxhTjVDtRW1DvkRJLdDofCrOq51GTctzLns,242
370
370
  arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
371
- arpakitlib/ar_zabbix_api_client_util.py,sha256=IeEonewaZvi8drZLFRdHUgBhlYhIypzydn89RqzdGoQ,9186
372
- arpakitlib-1.8.49.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
373
- arpakitlib-1.8.49.dist-info/METADATA,sha256=RbJgUM99Pb3Vhi12mQ5DD1OcHdt3uGWpxRkbN63zHZQ,3475
374
- arpakitlib-1.8.49.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
375
- arpakitlib-1.8.49.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
376
- arpakitlib-1.8.49.dist-info/RECORD,,
371
+ arpakitlib/ar_zabbix_api_client_util.py,sha256=etd_Q-jW5jaB-ejY5zBZYGtfzgu4P6HsRlxfx-YYEGU,9380
372
+ arpakitlib-1.8.51.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
373
+ arpakitlib-1.8.51.dist-info/METADATA,sha256=nAR1-GaEWj6_kkssWs6AXMR0-HfzU2XkxqH6I5a6BSM,3475
374
+ arpakitlib-1.8.51.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
375
+ arpakitlib-1.8.51.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
376
+ arpakitlib-1.8.51.dist-info/RECORD,,