python-terminusgps 1.5.2__tar.gz → 1.5.5__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.

Potentially problematic release.


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

Files changed (28) hide show
  1. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/PKG-INFO +1 -1
  2. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/pyproject.toml +7 -1
  3. python_terminusgps-1.5.5/terminusgps/settings.py +6 -0
  4. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/errors.py +12 -2
  5. python_terminusgps-1.5.5/terminusgps/wialon/session.py +301 -0
  6. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/uv.lock +242 -1
  7. python_terminusgps-1.5.2/terminusgps/wialon/session.py +0 -69
  8. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/.gitignore +0 -0
  9. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/COPYING +0 -0
  10. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/README.md +0 -0
  11. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/requirements.txt +0 -0
  12. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/__init__.py +0 -0
  13. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/authorizenet/__init__.py +0 -0
  14. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/authorizenet/auth.py +0 -0
  15. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/aws/__init__.py +0 -0
  16. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/aws/secrets.py +0 -0
  17. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/__init__.py +0 -0
  18. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/constants.py +0 -0
  19. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/flags.py +0 -0
  20. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/__init__.py +0 -0
  21. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/base.py +0 -0
  22. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/resource.py +0 -0
  23. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/retranslator.py +0 -0
  24. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/route.py +0 -0
  25. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/unit.py +0 -0
  26. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/unit_group.py +0 -0
  27. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/items/user.py +0 -0
  28. {python_terminusgps-1.5.2 → python_terminusgps-1.5.5}/terminusgps/wialon/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 1.5.2
3
+ Version: 1.5.5
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 = "1.5.2"
3
+ version = "1.5.5"
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" } ]
@@ -64,3 +64,9 @@ indent-style = "space"
64
64
  line-ending = "auto"
65
65
  docstring-code-format = false
66
66
  skip-magic-trailing-comma = true
67
+
68
+ [dependency-groups]
69
+ dev = [
70
+ "sphinx-rtd-theme>=3.0.2",
71
+ "sphinx>=8.1.3",
72
+ ]
@@ -0,0 +1,6 @@
1
+ from os import getenv
2
+
3
+ DEBUG = False
4
+ SECRET_KEY = "xem*6no%8d9%^qzt2f3x3ar-uq4_+7h9myc$t0!+4%bj5us6f)"
5
+ WIALON_ADMIN_ID = getenv("WIALON_ADMIN_ID")
6
+ WIALON_TOKEN = getenv("WIALON_TOKEN")
@@ -11,7 +11,17 @@ class WialonLoginError(WialonBaseError):
11
11
  def __init__(
12
12
  self, token: str | None, wialon_err: WialonError | None = None
13
13
  ) -> None:
14
- message = f"Failed to login to the Wialon API using token: '{token}'"
14
+ message = f"Failed to login to the Wialon API using token: '{token}'\n"
15
+ if wialon_err:
16
+ message += str(wialon_err)
17
+ super().__init__(message, wialon_err)
18
+
19
+
20
+ class WialonSessionDuplicationError(WialonBaseError):
21
+ def __init__(
22
+ self, session_id: str | None, wialon_err: WialonError | None = None
23
+ ) -> None:
24
+ message = f"Failed to duplicate the Wialon session: '#{session_id}'\n"
15
25
  if wialon_err:
16
26
  message += str(wialon_err)
17
27
  super().__init__(message, wialon_err)
@@ -19,7 +29,7 @@ class WialonLoginError(WialonBaseError):
19
29
 
20
30
  class WialonLogoutError(WialonBaseError):
21
31
  def __init__(self, session_id: str, wialon_err: WialonError | None = None) -> None:
22
- message = f"Failed to logout of the Wialon API session: '{session_id}'"
32
+ message = f"Failed to logout of the Wialon API session: '{session_id}'\n"
23
33
  if wialon_err:
24
34
  message += str(wialon_err)
25
35
  super().__init__(message, wialon_err)
@@ -0,0 +1,301 @@
1
+ from wialon.api import Wialon, WialonError
2
+ from pprint import pprint
3
+ from django.conf import settings
4
+ from django.core.exceptions import ImproperlyConfigured
5
+
6
+ from .errors import WialonLogoutError, WialonLoginError, WialonSessionDuplicationError
7
+
8
+
9
+ class WialonSession:
10
+ def __init__(
11
+ self,
12
+ token: str | None = None,
13
+ sid: str | None = None,
14
+ scheme: str = "https",
15
+ host: str = "hst-api.wialon.com",
16
+ port: int = 443,
17
+ ) -> None:
18
+ """
19
+ Starts or continues a Wialon API session.
20
+
21
+ :param token: An optional Wialon API token. Default is :confval:`WIALON_TOKEN`.
22
+ :type token: :py:obj:`str` | :py:obj:`None`
23
+ :param sid: An optional Wialon API session id. If provided, the session is continued.
24
+ :type sid: :py:obj:`str` | :py:obj:`None`
25
+ :raises ImproperlyConfigured: If either :confval:`WIALON_TOKEN` or :confval:`WIALON_ADMIN_ID` is not set.
26
+ :returns: Nothing.
27
+ :rtype: :py:obj:`None`
28
+
29
+ """
30
+ if not hasattr(settings, "WIALON_TOKEN"):
31
+ raise ImproperlyConfigured("'WIALON_TOKEN' setting is required.")
32
+ if not hasattr(settings, "WIALON_ADMIN_ID"):
33
+ raise ImproperlyConfigured("'WIALON_ADMIN_ID' setting is required.")
34
+
35
+ self.wialon_api = Wialon(scheme=scheme, host=host, port=port, sid=sid)
36
+ self.active = bool(sid)
37
+ self.token = token
38
+ self._username = None
39
+ self._gis_sid = None
40
+ self._hw_gp_ip = None
41
+ self._wsdk_version = None
42
+ self._uid = None
43
+
44
+ def __enter__(self) -> "WialonSession":
45
+ assert self.token, "Wialon API token was not set"
46
+ self.login(self.token)
47
+ return self
48
+
49
+ def __exit__(self, *args, **kwargs) -> None:
50
+ self.logout()
51
+
52
+ @property
53
+ def gis_geocode(self) -> str | None:
54
+ """
55
+ Gis geocode URL.
56
+
57
+ :type: :py:obj:`str` | :py:obj:`None`
58
+ :value: :py:obj:`None`
59
+
60
+ """
61
+ return self._gis_geocode
62
+
63
+ @property
64
+ def gis_render(self) -> str | None:
65
+ """
66
+ Gis rendering URL.
67
+
68
+ :type: :py:obj:`str` | :py:obj:`None`
69
+ :value: :py:obj:`None`
70
+
71
+ """
72
+ return self._gis_render
73
+
74
+ @property
75
+ def gis_routing(self) -> str | None:
76
+ """
77
+ Gis routing URL.
78
+
79
+ :type: :py:obj:`str` | :py:obj:`None`
80
+ :value: :py:obj:`None`
81
+
82
+ """
83
+ return self._gis_routing
84
+
85
+ @property
86
+ def gis_search(self) -> str | None:
87
+ """
88
+ Gis search URL.
89
+
90
+ :type: :py:obj:`str` | :py:obj:`None`
91
+ :value: :py:obj:`None`
92
+
93
+ """
94
+ return self._gis_search
95
+
96
+ @property
97
+ def gis_sid(self) -> str | None:
98
+ """
99
+ Gis session id.
100
+
101
+ :type: :py:obj:`str` | :py:obj:`None`
102
+ :value: :py:obj:`None`
103
+
104
+ """
105
+ return self._gis_sid
106
+
107
+ @property
108
+ def host(self) -> str | None:
109
+ """
110
+ IP of the client hosting the Wialon session.
111
+
112
+ :type: :py:obj:`str` | :py:obj:`None`
113
+ :value: :py:obj:`None`
114
+
115
+ """
116
+ return self._host
117
+
118
+ @property
119
+ def hw_gw_ip(self) -> str | None:
120
+ """
121
+ Hardware gateway IP.
122
+
123
+ :type: :py:obj:`str` | :py:obj:`None`
124
+ :value: :py:obj:`None`
125
+
126
+ """
127
+ return self._hw_gw_ip
128
+
129
+ @property
130
+ def hw_gw_dns(self) -> str | None:
131
+ """
132
+ Hardware gateway domain name, should evaluate to :py:attr:`hw_gw_ip` if present.
133
+
134
+ :type: :py:obj:`str` | :py:obj:`None`
135
+ :value: :py:obj:`None`
136
+
137
+ """
138
+ return self._hw_gw_dns
139
+
140
+ @property
141
+ def wsdk_version(self) -> str | None:
142
+ """
143
+ The Wialon Source Developer Kit (WSDK) version number of the session.
144
+
145
+ :type: :py:obj:`str` | :py:obj:`None`
146
+ :value: :py:obj:`None`
147
+
148
+ """
149
+ return self._wsdk_version
150
+
151
+ @property
152
+ def uid(self) -> str | None:
153
+ """
154
+ A Wialon user ID this session is operating as.
155
+
156
+ :type: :py:obj:`str` | :py:obj:`None`
157
+ :value: :py:obj:`None`
158
+ """
159
+ return self._uid
160
+
161
+ @property
162
+ def username(self) -> str | None:
163
+ """
164
+ A Wialon username the session is operating as.
165
+
166
+ :type: :py:obj:`str` | :py:obj:`None`
167
+ :value: :py:obj:`None`
168
+
169
+ """
170
+ return self._username
171
+
172
+ @property
173
+ def id(self) -> str | None:
174
+ """
175
+ Shortcut property for :py:attr:`WialonSession.wialon_api.sid`.
176
+
177
+ Returns :py:obj:`None` if the session wasn't logged in.
178
+
179
+ :type: :py:obj:`str` | :py:obj:`None`
180
+ :value: :py:obj:`None`
181
+
182
+ """
183
+ return self.wialon_api.sid
184
+
185
+ @property
186
+ def token(self) -> str:
187
+ """
188
+ A Wialon API token set during :py:meth:`WialonSession.__init__`.
189
+
190
+ Default token value is :confval:`WIALON_TOKEN`.
191
+
192
+ :type: :py:obj:`str`
193
+ :value: :confval:`WIALON_TOKEN`
194
+
195
+ """
196
+ return self._token
197
+
198
+ @token.setter
199
+ def token(self, value: str | None = None) -> None:
200
+ self._token = value if value else settings.WIALON_TOKEN
201
+
202
+ def duplicate(
203
+ self, user_id: str | None = None, continue_session: bool = False
204
+ ) -> None:
205
+ """
206
+ Duplicates the active Wialon API session.
207
+
208
+ :param user_id: A Wialon user to operate as in the session.
209
+ :type user_id: :py:obj:`str` | :py:obj:`None`
210
+ :param continue_session: Whether or not the original session id should be valid after duplication.
211
+ :type continue_session: :py:obj:`bool`
212
+ :raises WialonSessionDuplicationError: If the Wialon session was not duplicated.
213
+ :returns: Nothing.
214
+ :rtype: :py:obj:`None`
215
+
216
+ """
217
+ try:
218
+ login_response = self.wialon_api.core_duplicate(
219
+ **{"operateAs": user_id, "continueCurrentSession": continue_session}
220
+ )
221
+ except WialonError as e:
222
+ raise WialonSessionDuplicationError(self.id, e)
223
+ else:
224
+ self._set_login_response(login_response)
225
+ self.active = True
226
+
227
+ def login(self, token: str, flags: int = sum([0x1, 0x2, 0x20])) -> None:
228
+ """
229
+ Logs into the Wialon API and starts a new session.
230
+
231
+ :param token: An active Wialon API token.
232
+ :type token: :py:obj:`str`
233
+ :param user_id: A user to operate as in the Wialon API session.
234
+ :type user_id: :py:obj:`str` | :py:obj:`None`
235
+ :param flags: A login response flag integer.
236
+ :type flags: :py:obj:`int`
237
+ :raises WialonLoginError: If the login fails.
238
+ :raises AssertionError: If the session was already active.
239
+ :returns: Nothing.
240
+ :rtype: :py:obj:`None`
241
+
242
+ """
243
+ assert not self.active, "Cannot login to an active session."
244
+ try:
245
+ response = self.wialon_api.token_login(**{"token": token, "fl": flags})
246
+ pprint(response)
247
+ except WialonError as e:
248
+ raise WialonLoginError(token, e)
249
+ else:
250
+ self._set_login_response(response)
251
+ self.active = True
252
+
253
+ def logout(self) -> None:
254
+ """
255
+ Logs out of the Wialon API session.
256
+
257
+ :raises WialonLogoutError: If the logout fails.
258
+ :returns: Nothing.
259
+ :rtype: :py:obj:`None`
260
+
261
+ """
262
+ response: dict = self.wialon_api.core_logout({})
263
+ if response.get("error") != 0:
264
+ raise WialonLogoutError(str(self.id))
265
+
266
+ def _set_login_response(self, login_response: dict) -> None:
267
+ """
268
+ Sets the Wialon API session's attributes based on a login response.
269
+
270
+ :param login_response: A Wialon API response to :py:meth:`login`.
271
+ :type login_response: :py:obj:`dict`
272
+ :returns: Nothing.
273
+ :rtype: :py:obj:`None`
274
+
275
+ """
276
+ self.wialon_api.sid = login_response.get("eid")
277
+ self._gis_geocode = login_response.get("gis_geocode")
278
+ self._gis_render = login_response.get("gis_render")
279
+ self._gis_routing = login_response.get("gis_routing")
280
+ self._gis_search = login_response.get("gis_search")
281
+ self._gis_sid = login_response.get("gis_sid")
282
+ self._host = login_response.get("host")
283
+ self._hw_gw_dns = login_response.get("hw_gw_dns")
284
+ self._hw_gw_ip = login_response.get("hw_gw_ip")
285
+ self._uid = login_response.get("user", {}).get("id")
286
+ self._nm = login_response.get("user", {}).get("nm")
287
+ self._username = login_response.get("au")
288
+ self._video_service_url = login_response.get("video_service_url")
289
+ self._wsdk_version = login_response.get("wsdk_version")
290
+
291
+
292
+ def main() -> None:
293
+ session = WialonSession()
294
+ session.login(settings.WIALON_TOKEN)
295
+ session.duplicate(user_id="28944309")
296
+ session.logout()
297
+ return
298
+
299
+
300
+ if __name__ == "__main__":
301
+ main()
@@ -1,6 +1,15 @@
1
1
  version = 1
2
2
  requires-python = ">=3.12"
3
3
 
4
+ [[package]]
5
+ name = "alabaster"
6
+ version = "1.0.0"
7
+ source = { registry = "https://pypi.org/simple" }
8
+ sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210 }
9
+ wheels = [
10
+ { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929 },
11
+ ]
12
+
4
13
  [[package]]
5
14
  name = "argparse"
6
15
  version = "1.4.0"
@@ -30,6 +39,15 @@ dependencies = [
30
39
  ]
31
40
  sdist = { url = "https://files.pythonhosted.org/packages/2d/9a/61c151f508a9b32014b622c9c65b614c7c32068201eee1d93c93010558bc/authorizenet-1.1.5.tar.gz", hash = "sha256:ba8b538028201c01d7ed097ea0842f7732c220472006d105b4a6b948ddcaf4dc", size = 158959 }
32
41
 
42
+ [[package]]
43
+ name = "babel"
44
+ version = "2.16.0"
45
+ source = { registry = "https://pypi.org/simple" }
46
+ sdist = { url = "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316", size = 9348104 }
47
+ wheels = [
48
+ { url = "https://files.pythonhosted.org/packages/ed/20/bc79bc575ba2e2a7f70e8a1155618bb1301eaa5132a8271373a6903f73f8/babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", size = 9587599 },
49
+ ]
50
+
33
51
  [[package]]
34
52
  name = "boto3"
35
53
  version = "1.35.80"
@@ -106,6 +124,15 @@ wheels = [
106
124
  { url = "https://files.pythonhosted.org/packages/bf/9b/08c0432272d77b04803958a4598a51e2a4b51c06640af8b8f0f908c18bf2/charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079", size = 49446 },
107
125
  ]
108
126
 
127
+ [[package]]
128
+ name = "colorama"
129
+ version = "0.4.6"
130
+ source = { registry = "https://pypi.org/simple" }
131
+ sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 }
132
+ wheels = [
133
+ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },
134
+ ]
135
+
109
136
  [[package]]
110
137
  name = "django"
111
138
  version = "5.1.4"
@@ -120,6 +147,15 @@ wheels = [
120
147
  { url = "https://files.pythonhosted.org/packages/58/0b/8a4ab2c02982df4ed41e29f28f189459a7eba37899438e6bea7f39db793b/Django-5.1.4-py3-none-any.whl", hash = "sha256:236e023f021f5ce7dee5779de7b286565fdea5f4ab86bae5338e3f7b69896cf0", size = 8276471 },
121
148
  ]
122
149
 
150
+ [[package]]
151
+ name = "docutils"
152
+ version = "0.21.2"
153
+ source = { registry = "https://pypi.org/simple" }
154
+ sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444 }
155
+ wheels = [
156
+ { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408 },
157
+ ]
158
+
123
159
  [[package]]
124
160
  name = "future"
125
161
  version = "1.0.0"
@@ -138,6 +174,27 @@ wheels = [
138
174
  { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442 },
139
175
  ]
140
176
 
177
+ [[package]]
178
+ name = "imagesize"
179
+ version = "1.4.1"
180
+ source = { registry = "https://pypi.org/simple" }
181
+ sdist = { url = "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a", size = 1280026 }
182
+ wheels = [
183
+ { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769 },
184
+ ]
185
+
186
+ [[package]]
187
+ name = "jinja2"
188
+ version = "3.1.5"
189
+ source = { registry = "https://pypi.org/simple" }
190
+ dependencies = [
191
+ { name = "markupsafe" },
192
+ ]
193
+ sdist = { url = "https://files.pythonhosted.org/packages/af/92/b3130cbbf5591acf9ade8708c365f3238046ac7cb8ccba6e81abccb0ccff/jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb", size = 244674 }
194
+ wheels = [
195
+ { url = "https://files.pythonhosted.org/packages/bd/0f/2ba5fbcd631e3e88689309dbe978c5769e883e4b84ebfe7da30b43275c5a/jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb", size = 134596 },
196
+ ]
197
+
141
198
  [[package]]
142
199
  name = "jmespath"
143
200
  version = "1.0.1"
@@ -162,6 +219,62 @@ wheels = [
162
219
  { url = "https://files.pythonhosted.org/packages/5f/df/6d15cc415e04724ba4c141051cf43709e09bbcdd9868a6c2e7a7073ef498/lxml-4.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:f1faee2a831fe249e1bae9cbc68d3cd8a30f7e37851deee4d7962b17c410dd56", size = 3773977 },
163
220
  ]
164
221
 
222
+ [[package]]
223
+ name = "markupsafe"
224
+ version = "3.0.2"
225
+ source = { registry = "https://pypi.org/simple" }
226
+ sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537 }
227
+ wheels = [
228
+ { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274 },
229
+ { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348 },
230
+ { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149 },
231
+ { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118 },
232
+ { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993 },
233
+ { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178 },
234
+ { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319 },
235
+ { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352 },
236
+ { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097 },
237
+ { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601 },
238
+ { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274 },
239
+ { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352 },
240
+ { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122 },
241
+ { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085 },
242
+ { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978 },
243
+ { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208 },
244
+ { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357 },
245
+ { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344 },
246
+ { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101 },
247
+ { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603 },
248
+ { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510 },
249
+ { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486 },
250
+ { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480 },
251
+ { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914 },
252
+ { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796 },
253
+ { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473 },
254
+ { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114 },
255
+ { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098 },
256
+ { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208 },
257
+ { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739 },
258
+ ]
259
+
260
+ [[package]]
261
+ name = "packaging"
262
+ version = "24.2"
263
+ source = { registry = "https://pypi.org/simple" }
264
+ sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 }
265
+ wheels = [
266
+ { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 },
267
+ ]
268
+
269
+ [[package]]
270
+ name = "pygments"
271
+ version = "2.19.1"
272
+ source = { registry = "https://pypi.org/simple" }
273
+ sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581 }
274
+ wheels = [
275
+ { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293 },
276
+ ]
277
+
165
278
  [[package]]
166
279
  name = "python-dateutil"
167
280
  version = "2.9.0.post0"
@@ -176,7 +289,7 @@ wheels = [
176
289
 
177
290
  [[package]]
178
291
  name = "python-terminusgps"
179
- version = "1.4.7"
292
+ version = "1.5.3"
180
293
  source = { editable = "." }
181
294
  dependencies = [
182
295
  { name = "argparse" },
@@ -186,6 +299,12 @@ dependencies = [
186
299
  { name = "python-wialon" },
187
300
  ]
188
301
 
302
+ [package.dev-dependencies]
303
+ dev = [
304
+ { name = "sphinx" },
305
+ { name = "sphinx-rtd-theme" },
306
+ ]
307
+
189
308
  [package.metadata]
190
309
  requires-dist = [
191
310
  { name = "argparse", specifier = ">=1.4.0" },
@@ -195,6 +314,12 @@ requires-dist = [
195
314
  { name = "python-wialon", specifier = ">=1.2.4" },
196
315
  ]
197
316
 
317
+ [package.metadata.requires-dev]
318
+ dev = [
319
+ { name = "sphinx", specifier = ">=8.1.3" },
320
+ { name = "sphinx-rtd-theme", specifier = ">=3.0.2" },
321
+ ]
322
+
198
323
  [[package]]
199
324
  name = "python-wialon"
200
325
  version = "1.2.4"
@@ -288,6 +413,122 @@ wheels = [
288
413
  { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 },
289
414
  ]
290
415
 
416
+ [[package]]
417
+ name = "snowballstemmer"
418
+ version = "2.2.0"
419
+ source = { registry = "https://pypi.org/simple" }
420
+ sdist = { url = "https://files.pythonhosted.org/packages/44/7b/af302bebf22c749c56c9c3e8ae13190b5b5db37a33d9068652e8f73b7089/snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", size = 86699 }
421
+ wheels = [
422
+ { url = "https://files.pythonhosted.org/packages/ed/dc/c02e01294f7265e63a7315fe086dd1df7dacb9f840a804da846b96d01b96/snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a", size = 93002 },
423
+ ]
424
+
425
+ [[package]]
426
+ name = "sphinx"
427
+ version = "8.1.3"
428
+ source = { registry = "https://pypi.org/simple" }
429
+ dependencies = [
430
+ { name = "alabaster" },
431
+ { name = "babel" },
432
+ { name = "colorama", marker = "sys_platform == 'win32'" },
433
+ { name = "docutils" },
434
+ { name = "imagesize" },
435
+ { name = "jinja2" },
436
+ { name = "packaging" },
437
+ { name = "pygments" },
438
+ { name = "requests" },
439
+ { name = "snowballstemmer" },
440
+ { name = "sphinxcontrib-applehelp" },
441
+ { name = "sphinxcontrib-devhelp" },
442
+ { name = "sphinxcontrib-htmlhelp" },
443
+ { name = "sphinxcontrib-jsmath" },
444
+ { name = "sphinxcontrib-qthelp" },
445
+ { name = "sphinxcontrib-serializinghtml" },
446
+ ]
447
+ sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611 }
448
+ wheels = [
449
+ { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125 },
450
+ ]
451
+
452
+ [[package]]
453
+ name = "sphinx-rtd-theme"
454
+ version = "3.0.2"
455
+ source = { registry = "https://pypi.org/simple" }
456
+ dependencies = [
457
+ { name = "docutils" },
458
+ { name = "sphinx" },
459
+ { name = "sphinxcontrib-jquery" },
460
+ ]
461
+ sdist = { url = "https://files.pythonhosted.org/packages/91/44/c97faec644d29a5ceddd3020ae2edffa69e7d00054a8c7a6021e82f20335/sphinx_rtd_theme-3.0.2.tar.gz", hash = "sha256:b7457bc25dda723b20b086a670b9953c859eab60a2a03ee8eb2bb23e176e5f85", size = 7620463 }
462
+ wheels = [
463
+ { url = "https://files.pythonhosted.org/packages/85/77/46e3bac77b82b4df5bb5b61f2de98637724f246b4966cfc34bc5895d852a/sphinx_rtd_theme-3.0.2-py2.py3-none-any.whl", hash = "sha256:422ccc750c3a3a311de4ae327e82affdaf59eb695ba4936538552f3b00f4ee13", size = 7655561 },
464
+ ]
465
+
466
+ [[package]]
467
+ name = "sphinxcontrib-applehelp"
468
+ version = "2.0.0"
469
+ source = { registry = "https://pypi.org/simple" }
470
+ sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053 }
471
+ wheels = [
472
+ { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300 },
473
+ ]
474
+
475
+ [[package]]
476
+ name = "sphinxcontrib-devhelp"
477
+ version = "2.0.0"
478
+ source = { registry = "https://pypi.org/simple" }
479
+ sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967 }
480
+ wheels = [
481
+ { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530 },
482
+ ]
483
+
484
+ [[package]]
485
+ name = "sphinxcontrib-htmlhelp"
486
+ version = "2.1.0"
487
+ source = { registry = "https://pypi.org/simple" }
488
+ sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617 }
489
+ wheels = [
490
+ { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705 },
491
+ ]
492
+
493
+ [[package]]
494
+ name = "sphinxcontrib-jquery"
495
+ version = "4.1"
496
+ source = { registry = "https://pypi.org/simple" }
497
+ dependencies = [
498
+ { name = "sphinx" },
499
+ ]
500
+ sdist = { url = "https://files.pythonhosted.org/packages/de/f3/aa67467e051df70a6330fe7770894b3e4f09436dea6881ae0b4f3d87cad8/sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a", size = 122331 }
501
+ wheels = [
502
+ { url = "https://files.pythonhosted.org/packages/76/85/749bd22d1a68db7291c89e2ebca53f4306c3f205853cf31e9de279034c3c/sphinxcontrib_jquery-4.1-py2.py3-none-any.whl", hash = "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae", size = 121104 },
503
+ ]
504
+
505
+ [[package]]
506
+ name = "sphinxcontrib-jsmath"
507
+ version = "1.0.1"
508
+ source = { registry = "https://pypi.org/simple" }
509
+ sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787 }
510
+ wheels = [
511
+ { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071 },
512
+ ]
513
+
514
+ [[package]]
515
+ name = "sphinxcontrib-qthelp"
516
+ version = "2.0.0"
517
+ source = { registry = "https://pypi.org/simple" }
518
+ sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165 }
519
+ wheels = [
520
+ { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743 },
521
+ ]
522
+
523
+ [[package]]
524
+ name = "sphinxcontrib-serializinghtml"
525
+ version = "2.0.0"
526
+ source = { registry = "https://pypi.org/simple" }
527
+ sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080 }
528
+ wheels = [
529
+ { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072 },
530
+ ]
531
+
291
532
  [[package]]
292
533
  name = "sqlparse"
293
534
  version = "0.5.3"
@@ -1,69 +0,0 @@
1
- from wialon.api import Wialon, WialonError
2
- from django.conf import settings
3
- from django.core.exceptions import ImproperlyConfigured
4
-
5
- from .errors import WialonLogoutError, WialonLoginError
6
-
7
-
8
- class WialonSession:
9
- def __init__(self, token: str | None = None, sid: str | None = None) -> None:
10
- if not hasattr(settings, "WIALON_TOKEN"):
11
- raise ImproperlyConfigured("'WIALON_TOKEN' setting is required.")
12
-
13
- self.token = token
14
- self.wialon_api = Wialon(
15
- scheme="https", host="hst-api.wialon.com", port=443, sid=sid
16
- )
17
-
18
- @property
19
- def id(self) -> str | None:
20
- return self.wialon_api.sid
21
-
22
- @property
23
- def token(self) -> str | None:
24
- return self._token
25
-
26
- @token.setter
27
- def token(self, value: str | None = None) -> None:
28
- self._token = value if value else settings.WIALON_TOKEN
29
-
30
- def __enter__(self) -> "WialonSession":
31
- if not self.wialon_api.sid:
32
- self.login(self.token)
33
- return self
34
-
35
- def __exit__(self, exc_type, exc_value, exc_tb) -> None:
36
- self.logout()
37
- return
38
-
39
- def _deconstruct_login_response(self, login_response: dict) -> None:
40
- self.wialon_api.sid = login_response.get("eid", "")
41
- self.username = login_response.get("user", {}).get("nm")
42
- self.uid = login_response.get("user", {}).get("id")
43
- self.base_url = login_response.get("base_url", "")
44
- self.gis_sid = login_response.get("gis_sid", "")
45
- self.host = login_response.get("host", "")
46
- self.hw_gp_ip = login_response.get("hw_gw_ip", "")
47
- self.video_service_url = login_response.get("video_service_url", "")
48
- self.wsdk_version = login_response.get("wsdk_version", "")
49
- return
50
-
51
- def login(self, token: str | None = None) -> None:
52
- """Logs into the Wialon API and starts a new session."""
53
- if not token:
54
- raise ValueError("Must provide a Wialon API token to login with.")
55
- try:
56
- login_response = self.wialon_api.token_login(
57
- **{"token": token, "fl": sum([0x1, 0x2, 0x20])}
58
- )
59
- except WialonError as e:
60
- raise WialonLoginError(token, e)
61
- else:
62
- self._deconstruct_login_response(login_response)
63
-
64
- def logout(self) -> None:
65
- """Logs out of the Wialon API and raises an error if the session was not destroyed."""
66
- sid: str = str(self.id)
67
- logout_response = self.wialon_api.core_logout({})
68
- if logout_response.get("error") != 0:
69
- raise WialonLogoutError(sid)