python-terminusgps 20.2.0__tar.gz → 20.4.0__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 (37) hide show
  1. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/PKG-INFO +1 -1
  2. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/pyproject.toml +1 -1
  3. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/unit.py +34 -0
  4. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/uv.lock +1 -1
  5. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/.gitignore +0 -0
  6. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/COPYING +0 -0
  7. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/README.md +0 -0
  8. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/__init__.py +0 -0
  9. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/__init__.py +0 -0
  10. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/auth.py +0 -0
  11. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/profiles/__init__.py +0 -0
  12. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/profiles/addresses.py +0 -0
  13. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/profiles/base.py +0 -0
  14. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/profiles/customers.py +0 -0
  15. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/profiles/payments.py +0 -0
  16. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/authorizenet/subscriptions.py +0 -0
  17. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/aws/__init__.py +0 -0
  18. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/aws/secrets.py +0 -0
  19. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/aws/ses.py +0 -0
  20. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/settings.py +0 -0
  21. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/twilio/__init__.py +0 -0
  22. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/twilio/caller.py +0 -0
  23. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/__init__.py +0 -0
  24. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/constants.py +0 -0
  25. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/flags.py +0 -0
  26. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/__init__.py +0 -0
  27. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/base.py +0 -0
  28. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/geofence.py +0 -0
  29. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/notification.py +0 -0
  30. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/resource.py +0 -0
  31. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/retranslator.py +0 -0
  32. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/route.py +0 -0
  33. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/unit_group.py +0 -0
  34. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/items/user.py +0 -0
  35. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/logger.py +0 -0
  36. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/session.py +0 -0
  37. {python_terminusgps-20.2.0 → python_terminusgps-20.4.0}/terminusgps/wialon/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 20.2.0
3
+ Version: 20.4.0
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
5
  Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-terminusgps"
3
- version = "20.2.0"
3
+ version = "20.4.0"
4
4
  description = "Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more."
5
5
  readme = "README.md"
6
6
  authors = [ {name = "Blake Nall", email = "blake@terminusgps.com" } ]
@@ -36,12 +36,46 @@ class WialonUnit(WialonBase):
36
36
  )
37
37
  return int(response.get("item", {}).get("id")) if response.get("item") else None
38
38
 
39
+ def populate(self) -> None:
40
+ super().populate()
41
+ response = self.session.wialon_api.core_search_item(
42
+ **{
43
+ "id": self.id,
44
+ "flags": sum(
45
+ [flags.DATAFLAG_UNIT_ADVANCED_PROPERTIES, flags.DATAFLAG_UNIT_IMAGE]
46
+ ),
47
+ }
48
+ ).get("item", {})
49
+ self._imei_number = response.get("uid")
50
+ self._active = response.get("act", False)
51
+ self._image_uri = response.get("uri")
52
+
53
+ def get_position(self) -> dict:
54
+ return self.session.wialon_api.core_search_item(
55
+ **{"id": self.id, "flags": flags.DATAFLAG_UNIT_POSITION}
56
+ )
57
+
39
58
  @property
40
59
  def available_commands(self) -> dict:
41
60
  return self.session.wialon_api.core_get_hw_cmds(
42
61
  **{"deviceTypeId": 0, "unitId": self.id}
43
62
  )
44
63
 
64
+ @property
65
+ def image_uri(self) -> str:
66
+ return self._image_uri
67
+
68
+ @property
69
+ def imei_number(self) -> int | None:
70
+ if self._imei_number:
71
+ return int(self._imei_number)
72
+
73
+ @property
74
+ def active(self) -> bool:
75
+ if self._active:
76
+ return bool(self._active)
77
+ return False
78
+
45
79
  def execute_command(
46
80
  self,
47
81
  name: str,
@@ -504,7 +504,7 @@ wheels = [
504
504
 
505
505
  [[package]]
506
506
  name = "python-terminusgps"
507
- version = "20.2.0"
507
+ version = "20.4.0"
508
508
  source = { editable = "." }
509
509
  dependencies = [
510
510
  { name = "argparse" },