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

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: 41.3.0
3
+ Version: 41.3.1
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
@@ -29,14 +29,14 @@ terminusgps/wialon/validators.py,sha256=o5__H9HHnGYth8QAKErJG5rEub7FnT8ue0S3IQ8b
29
29
  terminusgps/wialon/items/__init__.py,sha256=RTiY9ziXqKCB8VWGoExOIErDlUMBBfzzsA7nlOlCZ2w,41
30
30
  terminusgps/wialon/items/account.py,sha256=OSTTbw-nBFqzL1AnGYQ7-Gaymr-S5wx1a0uDzOFlxCM,7888
31
31
  terminusgps/wialon/items/base.py,sha256=579Dmapm_v8QDJYa0NJhdqSWYR0X6aVx53slD38pltw,8639
32
- terminusgps/wialon/items/factory.py,sha256=a2XNiSsFR0zagYx9gYTNj8LyQMSXsQrv-C4RzTCtSvU,2156
32
+ terminusgps/wialon/items/factory.py,sha256=iWwR3EDnR58XUA9VWfk-0Sn89LZPFq_A1htvqFS1_nk,6682
33
33
  terminusgps/wialon/items/resource.py,sha256=eW33Jt5gnkeUKXUhf3TIfufgD2IfVc9qmJy8-pF4apA,4516
34
34
  terminusgps/wialon/items/retranslator.py,sha256=nJvYsvRCyb8hIx2qmUUcXfYeNiBUMW018xnOfv2w-Fg,1753
35
35
  terminusgps/wialon/items/route.py,sha256=xixlex6bUeFHXucVQdbfQUSLxI1Rhwk6slhoFP2odp0,1307
36
36
  terminusgps/wialon/items/unit.py,sha256=kfiqysdPxiU_8fHomKZEz3Ypbkaoc5HevOzpqr7R7rI,5189
37
37
  terminusgps/wialon/items/unit_group.py,sha256=L7-PAVCj8Bf50fa04Ials4VHg8LOWkw6hwNhtSyMksE,2133
38
38
  terminusgps/wialon/items/user.py,sha256=hZlFeXCgOAdivl_Anjp_We6Cy5U8IxWNDAgm5MFZfp0,5194
39
- python_terminusgps-41.3.0.dist-info/METADATA,sha256=9BHo1xTbDTjTZJmo6xJhAyboF8MopV0ILY9ff4U-Dlw,976
40
- python_terminusgps-41.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
- python_terminusgps-41.3.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
42
- python_terminusgps-41.3.0.dist-info/RECORD,,
39
+ python_terminusgps-41.3.1.dist-info/METADATA,sha256=-Ryu7rkACdV-MH2CPn0NXuZGqZNk7AmUM-gbEuYq5FI,976
40
+ python_terminusgps-41.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ python_terminusgps-41.3.1.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
42
+ python_terminusgps-41.3.1.dist-info/RECORD,,
@@ -28,7 +28,39 @@ class WialonObjectFactory:
28
28
  self.session = session
29
29
 
30
30
  def get(self, id: int | str, items_type: str) -> WialonObject:
31
- """Returns a Wialon object that already exists in Wialon by id."""
31
+ """
32
+ Returns a Wialon object that already exists in Wialon by id.
33
+
34
+ :param id: A Wialon object id.
35
+ :type id: :py:obj:`int` | :py:obj:`str`
36
+ :param items_type: A Wialon items type string.
37
+ :type items_type: :py:obj:`str`
38
+ :raises ValueError: If ``id`` wasn't a digit.
39
+ :raises ValueError: If ``items_type`` was invalid.
40
+ :returns: An existing Wialon object.
41
+ :rtype: :py:obj:`WialonObject`
42
+
43
+ Available items_type options:
44
+
45
+ +-------------------------+---------------------------------------------------------------------+
46
+ | key | class |
47
+ +=========================+=====================================================================+
48
+ | ``"account"`` | :py:obj:`~terminusgps.wialon.items.account.WialonAccount` |
49
+ +-------------------------+---------------------------------------------------------------------+
50
+ | ``"avl_resource"`` | :py:obj:`~terminusgps.wialon.items.resource.WialonResource` |
51
+ +-------------------------+---------------------------------------------------------------------+
52
+ | ``"avl_retranslator"`` | :py:obj:`~terminusgps.wialon.items.retranslator.WialonRetranslator` |
53
+ +-------------------------+---------------------------------------------------------------------+
54
+ | ``"avl_route"`` | :py:obj:`~terminusgps.wialon.items.route.WialonRoute` |
55
+ +-------------------------+---------------------------------------------------------------------+
56
+ | ``"avl_unit"`` | :py:obj:`~terminusgps.wialon.items.unit.WialonUnit` |
57
+ +-------------------------+---------------------------------------------------------------------+
58
+ | ``"avl_unit_group"`` | :py:obj:`~terminusgps.wialon.items.unit_group.WialonUnitGroup` |
59
+ +-------------------------+---------------------------------------------------------------------+
60
+ | ``"user"`` | :py:obj:`~terminusgps.wialon.items.user.WialonUser` |
61
+ +-------------------------+---------------------------------------------------------------------+
62
+
63
+ """
32
64
  if isinstance(id, str) and not id.isdigit():
33
65
  raise ValueError(f"'id' can only be digits, got '{id}'.")
34
66
  if items_type not in WIALON_ITEMSTYPE_MAP:
@@ -39,7 +71,38 @@ class WialonObjectFactory:
39
71
  return cls(session=self.session, id=int(id))
40
72
 
41
73
  def create(self, items_type: str, *args, **kwargs) -> WialonObject:
42
- """Returns a Wialon object after creating it in Wialon."""
74
+ """
75
+ Returns a Wialon object after creating it in Wialon.
76
+
77
+ :param items_type: A Wialon items type string.
78
+ :type items_type: :py:obj:`str`
79
+ :param args: Positional arguments passed to the object's :py:meth:`create` method.
80
+ :param kwargs: Keyword arguments passed to the object's :py:meth:`create` method.
81
+ :raises ValueError: If ``items_type`` was invalid.
82
+ :returns: A newly created Wialon object.
83
+ :rtype: :py:obj:`WialonObject`
84
+
85
+ Available items_type options:
86
+
87
+ +-------------------------+---------------------------------------------------------------------+
88
+ | key | class |
89
+ +=========================+=====================================================================+
90
+ | ``"account"`` | :py:obj:`~terminusgps.wialon.items.account.WialonAccount` |
91
+ +-------------------------+---------------------------------------------------------------------+
92
+ | ``"avl_resource"`` | :py:obj:`~terminusgps.wialon.items.resource.WialonResource` |
93
+ +-------------------------+---------------------------------------------------------------------+
94
+ | ``"avl_retranslator"`` | :py:obj:`~terminusgps.wialon.items.retranslator.WialonRetranslator` |
95
+ +-------------------------+---------------------------------------------------------------------+
96
+ | ``"avl_route"`` | :py:obj:`~terminusgps.wialon.items.route.WialonRoute` |
97
+ +-------------------------+---------------------------------------------------------------------+
98
+ | ``"avl_unit"`` | :py:obj:`~terminusgps.wialon.items.unit.WialonUnit` |
99
+ +-------------------------+---------------------------------------------------------------------+
100
+ | ``"avl_unit_group"`` | :py:obj:`~terminusgps.wialon.items.unit_group.WialonUnitGroup` |
101
+ +-------------------------+---------------------------------------------------------------------+
102
+ | ``"user"`` | :py:obj:`~terminusgps.wialon.items.user.WialonUser` |
103
+ +-------------------------+---------------------------------------------------------------------+
104
+
105
+ """
43
106
  if items_type not in WIALON_ITEMSTYPE_MAP:
44
107
  raise ValueError(f"Invalid Wialon items type: '{items_type}'.")
45
108
  cls = WIALON_ITEMSTYPE_MAP.get(items_type)