python-terminusgps 36.7.0__py3-none-any.whl → 36.7.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.

Potentially problematic release.


This version of python-terminusgps might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 36.7.0
3
+ Version: 36.7.2
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
5
  Project-URL: Documentation, https://docs.terminusgps.com
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -42,17 +42,17 @@ terminusgps/wialon/utils.py,sha256=iGOY8v7cNaSoA9Mo17d1bKAQMBtcotGq3FEQrghgvCo,1
42
42
  terminusgps/wialon/validators.py,sha256=j5vrtcfClAzRdRkWTvRRAmrne1t0R6cKkmYdE7fAkSs,4247
43
43
  terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
44
44
  terminusgps/wialon/items/base.py,sha256=ZScO0Fi6qYd1aGvUe9kfmbZK2ezUWBI-Qqowv0foVwg,10781
45
- terminusgps/wialon/items/resource.py,sha256=P3lgaE_jVvLtCHZWAbJPLCE6e8VhBwZc0okh1F460gY,18160
45
+ terminusgps/wialon/items/resource.py,sha256=X14qvYB9a8OH_LZfFL4BiaEPLnc6O-6OXN1SqRw7Ig8,18219
46
46
  terminusgps/wialon/items/retranslator.py,sha256=2J1x7lNxRck-IEXrmJ7RM9bVL60mrZkfmczOSiUhiO8,3873
47
47
  terminusgps/wialon/items/route.py,sha256=2dEUK9o8nwutPE03W-5GUcZrjGvbwLoExVnFV9LyedE,1326
48
- terminusgps/wialon/items/unit.py,sha256=4bbaXVWPp1NaO5SJv8NHSUsItmkhXCYzVaUMhB5GRGg,11419
48
+ terminusgps/wialon/items/unit.py,sha256=r5Fu6s9a5kS1Tk1jyqQodYeqKl-LjGOotGBP4kvCU2s,11836
49
49
  terminusgps/wialon/items/unit_group.py,sha256=HhYMZ9b7UATXeEgHkXN9r5-M_w82fabjDYADCUwBtxQ,4442
50
- terminusgps/wialon/items/user.py,sha256=X5Kip414n3dIKsOJ6AieUyOC870yDWGRLIoA-TVsfPQ,5402
50
+ terminusgps/wialon/items/user.py,sha256=pR6OTrm6f7Zo0J8eLvKtWVsdhGi430OxMsMMthGh8YE,5382
51
51
  terminusgps/wialon/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  terminusgps/wialon/tests/test_items.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  terminusgps/wialon/tests/test_session.py,sha256=9mBlYchMo9NeqRIZsmxYzrM1zBHorqu4ooxqSNppLpI,1336
54
54
  terminusgps/wialon/tests/test_utils.py,sha256=SK4PxJQGECFnzx_EQeRAQfsQ5_3FLaVcis2W9u_ibuI,1730
55
- python_terminusgps-36.7.0.dist-info/METADATA,sha256=yHtIQldIVE8535R3fmf2x5uvjSL3DGix9oiqkbo_WXY,1264
56
- python_terminusgps-36.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
- python_terminusgps-36.7.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
- python_terminusgps-36.7.0.dist-info/RECORD,,
55
+ python_terminusgps-36.7.2.dist-info/METADATA,sha256=lqCMWbUlQmxlvFwZguueqYMmKNA4wwBNsEUTdqQRg3c,1264
56
+ python_terminusgps-36.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
+ python_terminusgps-36.7.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
+ python_terminusgps-36.7.2.dist-info/RECORD,,
@@ -8,7 +8,8 @@ from terminusgps.wialon.items.base import WialonBase
8
8
  class WialonResource(WialonBase):
9
9
  """A Wialon `resource/account <https://help.wialon.com/en/wialon-hosting/user-guide/management-system/accounts-and-resources>`_."""
10
10
 
11
- def __init__(self) -> None:
11
+ def __init__(self, *args, **kwargs) -> None:
12
+ super().__init__(*args, **kwargs)
12
13
  self._is_account = None
13
14
 
14
15
  def create(
@@ -23,7 +24,7 @@ class WialonResource(WialonBase):
23
24
  :type name: :py:obj:`str`
24
25
  :param skip_creator_check: Bypass object creation restrictions while creating the resource.
25
26
  :type skip_creator_check: :py:obj:`bool`
26
- :raises ValueError: If ``creator_id`` is not a digit.
27
+ :raises ValueError: If ``creator_id`` wasn't a digit.
27
28
  :raises WialonError: If something went wrong with a Wialon API call.
28
29
  :returns: The Wialon id for the new resource, if it was created.
29
30
  :rtype: :py:obj:`int` | :py:obj:`None`
@@ -1,3 +1,4 @@
1
+ from datetime import datetime
1
2
  from urllib.parse import urljoin
2
3
 
3
4
  from django.conf import settings
@@ -82,28 +83,31 @@ class WialonUnit(WialonBase):
82
83
 
83
84
  Response format:
84
85
 
85
- +----------+-----------------+--------------+
86
- | key | type | desc |
87
- +==========+=================+==============+
88
- | ``"t"`` | :py:obj:`int` | Time (UTC) |
89
- +----------+-----------------+--------------+
90
- | ``"y"`` | :py:obj:`float` | Latitude |
91
- +----------+---------------+----------------+
92
- | ``"x"`` | :py:obj:`float` | Longitude |
93
- +----------+---------------+----------------+
94
- | ``"z"`` | :py:obj:`float` | Altitude |
95
- +----------+-----------------+--------------+
96
- | ``"s"`` | :py:obj:`int` | Speed |
97
- +----------+-----------------+--------------+
98
- | ``"c"`` | :py:obj:`int` | Course |
99
- +----------+-----------------+--------------+
100
- | ``"sc"`` | :py:obj:`int` | Satellites # |
101
- +----------+-----------------+--------------+
86
+ +----------+------------------------------+-----------------+
87
+ | key | type | desc |
88
+ +==========+==============================+=================+
89
+ | ``"t"`` | :py:obj:`~datetime.datetime` | Time (UTC) |
90
+ +----------+------------------------------+-----------------+
91
+ | ``"y"`` | :py:obj:`float` | Latitude |
92
+ +----------+------------------------------+-----------------+
93
+ | ``"x"`` | :py:obj:`float` | Longitude |
94
+ +----------+------------------------------+-----------------+
95
+ | ``"z"`` | :py:obj:`float` | Altitude |
96
+ +----------+------------------------------+-----------------+
97
+ | ``"s"`` | :py:obj:`int` | Speed |
98
+ +----------+------------------------------+-----------------+
99
+ | ``"c"`` | :py:obj:`int` | Course |
100
+ +----------+------------------------------+-----------------+
101
+ | ``"sc"`` | :py:obj:`int` | # of satellites |
102
+ +----------+------------------------------+-----------------+
102
103
 
103
104
  """
104
- return self.session.wialon_api.core_search_item(
105
+ response = self.session.wialon_api.core_search_item(
105
106
  **{"id": self.id, "flags": flags.DataFlag.UNIT_POSITION}
106
107
  ).get("pos", {})
108
+ if response:
109
+ response["t"] = datetime.fromtimestamp(response["t"])
110
+ return response
107
111
 
108
112
  def execute_command(
109
113
  self,
@@ -97,7 +97,7 @@ class WialonUser(WialonBase):
97
97
 
98
98
  def update_password(self, old_password: str, new_password: str) -> None:
99
99
  """
100
- Updates the user's password to ``new_password``.
100
+ Updates the user's password.
101
101
 
102
102
  :param old_password: The user's original password.
103
103
  :type old_password: :py:obj:`str`