python-terminusgps 1.5.10__tar.gz → 1.6.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.
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/PKG-INFO +1 -1
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/pyproject.toml +1 -1
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/session.py +21 -8
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/uv.lock +13 -13
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/.gitignore +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/COPYING +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/README.md +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/requirements.txt +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/__init__.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/authorizenet/auth.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/aws/__init__.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/aws/secrets.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/settings.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/constants.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/errors.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/flags.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/__init__.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/base.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/resource.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/retranslator.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/route.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/unit.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/unit_group.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/user.py +0 -0
- {python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.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 = "1.
|
|
3
|
+
version = "1.6.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" } ]
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import threading
|
|
2
|
+
|
|
1
3
|
from wialon.api import Wialon, WialonError
|
|
2
4
|
from django.conf import settings
|
|
3
5
|
from django.core.exceptions import ImproperlyConfigured
|
|
@@ -307,13 +309,24 @@ class WialonSession:
|
|
|
307
309
|
self._wsdk_version = login_response.get("wsdk_version")
|
|
308
310
|
|
|
309
311
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
312
|
+
class WialonSessionManager:
|
|
313
|
+
_instance = None
|
|
314
|
+
_lock = threading.Lock()
|
|
315
|
+
_session = None
|
|
316
|
+
|
|
317
|
+
def __new__(cls) -> "WialonSessionManager":
|
|
318
|
+
with cls._lock:
|
|
319
|
+
if not cls._instance:
|
|
320
|
+
cls._instance = super().__new__(cls)
|
|
321
|
+
return cls._instance
|
|
316
322
|
|
|
323
|
+
def get_session(self, sid: str | None = None) -> WialonSession:
|
|
324
|
+
if not hasattr(settings, "WIALON_TOKEN"):
|
|
325
|
+
raise ImproperlyConfigured("'WIALON_TOKEN' setting is required.")
|
|
317
326
|
|
|
318
|
-
|
|
319
|
-
|
|
327
|
+
with self._lock:
|
|
328
|
+
if not self._session or not self._session.active:
|
|
329
|
+
self._session = WialonSession(sid=sid)
|
|
330
|
+
if not self._session.active:
|
|
331
|
+
self._session.login(settings.WIALON_TOKEN)
|
|
332
|
+
return self._session
|
|
@@ -50,30 +50,30 @@ wheels = [
|
|
|
50
50
|
|
|
51
51
|
[[package]]
|
|
52
52
|
name = "boto3"
|
|
53
|
-
version = "1.36.
|
|
53
|
+
version = "1.36.9"
|
|
54
54
|
source = { registry = "https://pypi.org/simple" }
|
|
55
55
|
dependencies = [
|
|
56
56
|
{ name = "botocore" },
|
|
57
57
|
{ name = "jmespath" },
|
|
58
58
|
{ name = "s3transfer" },
|
|
59
59
|
]
|
|
60
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
60
|
+
sdist = { url = "https://files.pythonhosted.org/packages/01/36/2e445688adf538259f469bd1f415619959df2aa9ac2972df8a5728791898/boto3-1.36.9.tar.gz", hash = "sha256:035ed3868ff3b9afe05a49d0bde35582315bc438e60b5e76727a00b107567bfb", size = 111028 }
|
|
61
61
|
wheels = [
|
|
62
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
62
|
+
{ url = "https://files.pythonhosted.org/packages/16/27/d5a257251bd046409505034d76c7a76a692dd8d4aa31bdc1ebef7881ef1e/boto3-1.36.9-py3-none-any.whl", hash = "sha256:440d0b70990efb732f63b40fa16c663c86fee80347eb4bf3bcc08b593e8ac77f", size = 139166 },
|
|
63
63
|
]
|
|
64
64
|
|
|
65
65
|
[[package]]
|
|
66
66
|
name = "botocore"
|
|
67
|
-
version = "1.36.
|
|
67
|
+
version = "1.36.9"
|
|
68
68
|
source = { registry = "https://pypi.org/simple" }
|
|
69
69
|
dependencies = [
|
|
70
70
|
{ name = "jmespath" },
|
|
71
71
|
{ name = "python-dateutil" },
|
|
72
72
|
{ name = "urllib3" },
|
|
73
73
|
]
|
|
74
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
74
|
+
sdist = { url = "https://files.pythonhosted.org/packages/e9/1e/976c79eeac461ddbf64b27ce42788c1f26e111c138bb931d14b4062127e5/botocore-1.36.9.tar.gz", hash = "sha256:cb3baefdb8326fdfae0750015e5868330e18d3a088a31da658df2cc8cba7ac73", size = 13493557 }
|
|
75
75
|
wheels = [
|
|
76
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
76
|
+
{ url = "https://files.pythonhosted.org/packages/52/e9/fc6e02d198d52818e6658c727a250e89c7570323fc983468f76d761563f1/botocore-1.36.9-py3-none-any.whl", hash = "sha256:e31d206c7708300c541d0799df73b576bbe7d8bed011687d96323ed48763ffd2", size = 13321702 },
|
|
77
77
|
]
|
|
78
78
|
|
|
79
79
|
[[package]]
|
|
@@ -285,7 +285,7 @@ wheels = [
|
|
|
285
285
|
|
|
286
286
|
[[package]]
|
|
287
287
|
name = "python-terminusgps"
|
|
288
|
-
version = "1.
|
|
288
|
+
version = "1.6.0"
|
|
289
289
|
source = { editable = "." }
|
|
290
290
|
dependencies = [
|
|
291
291
|
{ name = "argparse" },
|
|
@@ -355,14 +355,14 @@ wheels = [
|
|
|
355
355
|
|
|
356
356
|
[[package]]
|
|
357
357
|
name = "s3transfer"
|
|
358
|
-
version = "0.11.
|
|
358
|
+
version = "0.11.2"
|
|
359
359
|
source = { registry = "https://pypi.org/simple" }
|
|
360
360
|
dependencies = [
|
|
361
361
|
{ name = "botocore" },
|
|
362
362
|
]
|
|
363
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
363
|
+
sdist = { url = "https://files.pythonhosted.org/packages/62/45/2323b5928f86fd29f9afdcef4659f68fa73eaa5356912b774227f5cf46b5/s3transfer-0.11.2.tar.gz", hash = "sha256:3b39185cb72f5acc77db1a58b6e25b977f28d20496b6e58d6813d75f464d632f", size = 147885 }
|
|
364
364
|
wheels = [
|
|
365
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
365
|
+
{ url = "https://files.pythonhosted.org/packages/1b/ac/e7dc469e49048dc57f62e0c555d2ee3117fa30813d2a1a2962cce3a2a82a/s3transfer-0.11.2-py3-none-any.whl", hash = "sha256:be6ecb39fadd986ef1701097771f87e4d2f821f27f6071c872143884d2950fbc", size = 84151 },
|
|
366
366
|
]
|
|
367
367
|
|
|
368
368
|
[[package]]
|
|
@@ -536,11 +536,11 @@ wheels = [
|
|
|
536
536
|
|
|
537
537
|
[[package]]
|
|
538
538
|
name = "tzdata"
|
|
539
|
-
version = "
|
|
539
|
+
version = "2025.1"
|
|
540
540
|
source = { registry = "https://pypi.org/simple" }
|
|
541
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
541
|
+
sdist = { url = "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694", size = 194950 }
|
|
542
542
|
wheels = [
|
|
543
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
543
|
+
{ url = "https://files.pythonhosted.org/packages/0f/dd/84f10e23edd882c6f968c21c2434fe67bd4a528967067515feca9e611e5e/tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639", size = 346762 },
|
|
544
544
|
]
|
|
545
545
|
|
|
546
546
|
[[package]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/retranslator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.5.10 → python_terminusgps-1.6.0}/terminusgps/wialon/items/unit_group.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|