python-terminusgps 37.7.4__py3-none-any.whl → 37.7.6__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.
- {python_terminusgps-37.7.4.dist-info → python_terminusgps-37.7.6.dist-info}/METADATA +1 -1
- {python_terminusgps-37.7.4.dist-info → python_terminusgps-37.7.6.dist-info}/RECORD +7 -7
- terminusgps/aws/secrets.py +9 -5
- terminusgps/django/forms/widgets.py +0 -2
- terminusgps/wialon/session.py +2 -2
- {python_terminusgps-37.7.4.dist-info → python_terminusgps-37.7.6.dist-info}/WHEEL +0 -0
- {python_terminusgps-37.7.4.dist-info → python_terminusgps-37.7.6.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 37.7.
|
|
3
|
+
Version: 37.7.6
|
|
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
|
|
@@ -17,7 +17,7 @@ terminusgps/authorizenet/tests/test_profiles.py,sha256=MkpMSU9cgSeLy9bBuZdhdFiPx
|
|
|
17
17
|
terminusgps/authorizenet/tests/test_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
terminusgps/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
terminusgps/aws/notifications.py,sha256=76YnACuVIMs5EujEATqcBf8HcCFxs2649fnLx9nSauc,11103
|
|
20
|
-
terminusgps/aws/secrets.py,sha256=
|
|
20
|
+
terminusgps/aws/secrets.py,sha256=3D8kHS4oLDK9xOUMXSK53gKoWEk8RVy8-gYPlx8KOu4,900
|
|
21
21
|
terminusgps/aws/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
terminusgps/aws/tests/test_notifications.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
terminusgps/aws/tests/test_secrets.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -30,7 +30,7 @@ terminusgps/django/forms/__init__.py,sha256=hh8Z9AC_u2m2bu3h6sdmPyndfQneCEVovENP
|
|
|
30
30
|
terminusgps/django/forms/fields.py,sha256=BfuPzOZyGvWsEzONW2h4i01fhoL0IS0-gDdBKW4jHgI,2225
|
|
31
31
|
terminusgps/django/forms/forms.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
terminusgps/django/forms/renderer.py,sha256=QSLQ94Ff7ZaV1jD6wAL-ltvdKIblED8Wsv5EXvSbUJ4,394
|
|
33
|
-
terminusgps/django/forms/widgets.py,sha256=
|
|
33
|
+
terminusgps/django/forms/widgets.py,sha256=No4hPQ-BK5rrotaQ5iJEjWo8quYIPNf_1C2y4OAIxro,2037
|
|
34
34
|
terminusgps/django/tests/test_forms.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
35
35
|
terminusgps/django/tests/test_mixins.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
terminusgps/django/tests/test_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -40,7 +40,7 @@ terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
40
40
|
terminusgps/wialon/constants.py,sha256=05pLc_0S-x0tT87cQcxOmr8plesjOQxoXfUdjIHwI90,7732
|
|
41
41
|
terminusgps/wialon/flags.py,sha256=M50EdhxQ8IMnJnU0mrHK7-h8Asc6tvNiTOOfd1dBW6A,12815
|
|
42
42
|
terminusgps/wialon/renderer.py,sha256=ubmaLjdJyksO2qiWHbIBvYeDqlFya2br7oJYsdfoyV8,7046
|
|
43
|
-
terminusgps/wialon/session.py,sha256=
|
|
43
|
+
terminusgps/wialon/session.py,sha256=osIBLGgpfZgu4tD-afZQlIszzHH9aD30FEToJ5wwsTc,10125
|
|
44
44
|
terminusgps/wialon/utils.py,sha256=ntHLAVJSJBdIgJK704xxFNFRopaFz-No9YZZOMmvWO8,11627
|
|
45
45
|
terminusgps/wialon/validators.py,sha256=o5__H9HHnGYth8QAKErJG5rEub7FnT8ue0S3IQ8b67o,4232
|
|
46
46
|
terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
|
|
@@ -51,7 +51,7 @@ terminusgps/wialon/items/route.py,sha256=2dEUK9o8nwutPE03W-5GUcZrjGvbwLoExVnFV9L
|
|
|
51
51
|
terminusgps/wialon/items/unit.py,sha256=FsOQdCFJPiUp2OuCxzqYI_oEYBWcjgWxicYiNRFkGBM,12590
|
|
52
52
|
terminusgps/wialon/items/unit_group.py,sha256=HhYMZ9b7UATXeEgHkXN9r5-M_w82fabjDYADCUwBtxQ,4442
|
|
53
53
|
terminusgps/wialon/items/user.py,sha256=pR6OTrm6f7Zo0J8eLvKtWVsdhGi430OxMsMMthGh8YE,5382
|
|
54
|
-
python_terminusgps-37.7.
|
|
55
|
-
python_terminusgps-37.7.
|
|
56
|
-
python_terminusgps-37.7.
|
|
57
|
-
python_terminusgps-37.7.
|
|
54
|
+
python_terminusgps-37.7.6.dist-info/METADATA,sha256=vhZYrAA4iKD0Fwc8AZ5FWl5L9E3LgxyoxHRuA9m4zJ8,1329
|
|
55
|
+
python_terminusgps-37.7.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
56
|
+
python_terminusgps-37.7.6.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
57
|
+
python_terminusgps-37.7.6.dist-info/RECORD,,
|
terminusgps/aws/secrets.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
3
|
import boto3
|
|
4
|
+
import botocore.exceptions
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
def get_secret(name: str, region: str = "us-east-1") -> dict[str, str]:
|
|
@@ -12,13 +13,16 @@ def get_secret(name: str, region: str = "us-east-1") -> dict[str, str]:
|
|
|
12
13
|
:param region: An AWS region name. Default is :py:obj:`"us-east-1"`.
|
|
13
14
|
:type region: :py:obj:`str`
|
|
14
15
|
:returns: A secret value dictionary.
|
|
15
|
-
:rtype: :py:obj:`dict
|
|
16
|
+
:rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
.. _secretsmanager: https://docs.aws.amazon.com/secretsmanager/
|
|
19
20
|
|
|
20
21
|
"""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
try:
|
|
23
|
+
session = boto3.Session(profile_name="terminusgps-site-role")
|
|
24
|
+
client = session.client(service_name="secretsmanager", region_name=region)
|
|
25
|
+
secret = client.get_secret_value(**{"SecretId": name})["SecretString"]
|
|
26
|
+
return json.loads(secret)
|
|
27
|
+
except botocore.exceptions.ProfileNotFound:
|
|
28
|
+
return {}
|
terminusgps/wialon/session.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dataclasses
|
|
2
2
|
import datetime
|
|
3
|
+
import os
|
|
3
4
|
import typing
|
|
4
5
|
|
|
5
6
|
import wialon.api
|
|
6
|
-
from django.conf import settings
|
|
7
7
|
from loguru import logger
|
|
8
8
|
|
|
9
9
|
from . import flags as wialon_flags
|
|
@@ -90,7 +90,7 @@ class WialonSession:
|
|
|
90
90
|
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
|
-
self._token = token or
|
|
93
|
+
self._token = token or os.getenv("WIALON_TOKEN")
|
|
94
94
|
self._username = None
|
|
95
95
|
self._gis_sid = None
|
|
96
96
|
self._hw_gp_ip = None
|
|
File without changes
|
{python_terminusgps-37.7.4.dist-info → python_terminusgps-37.7.6.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|