python-terminusgps 36.9.3__py3-none-any.whl → 37.0.0__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.
- {python_terminusgps-36.9.3.dist-info → python_terminusgps-37.0.0.dist-info}/METADATA +1 -1
- {python_terminusgps-36.9.3.dist-info → python_terminusgps-37.0.0.dist-info}/RECORD +7 -6
- terminusgps/django/forms/renderer.py +10 -0
- terminusgps/django/settings.py +1 -0
- terminusgps/wialon/utils.py +23 -0
- {python_terminusgps-36.9.3.dist-info → python_terminusgps-37.0.0.dist-info}/WHEEL +0 -0
- {python_terminusgps-36.9.3.dist-info → python_terminusgps-37.0.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version:
|
|
3
|
+
Version: 37.0.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://docs.terminusgps.com
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -22,12 +22,13 @@ terminusgps/aws/tests/test_notifications.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
22
22
|
terminusgps/aws/tests/test_secrets.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
terminusgps/django/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
terminusgps/django/mixins.py,sha256=Q9ZJuzpk3d9lDnlVA8ZTVvnZWxB13p08EQ8yVJcztn4,1034
|
|
25
|
-
terminusgps/django/settings.py,sha256=
|
|
25
|
+
terminusgps/django/settings.py,sha256=mzD1qmaH8C9sKEEb6vo4-hDiMMGw-VIkzQmDvtOpfqg,761
|
|
26
26
|
terminusgps/django/utils.py,sha256=SYDQyHA5tTuVwdpZGsCtf0LpTTD0ilRKoxa8StfSTpQ,156
|
|
27
27
|
terminusgps/django/validators.py,sha256=Gx-bpWkfI0fM4WXVRUpoC2ihPqs7agjdHAFO6gralCs,3341
|
|
28
28
|
terminusgps/django/forms/__init__.py,sha256=hh8Z9AC_u2m2bu3h6sdmPyndfQneCEVovENPHmoTDC0,21
|
|
29
29
|
terminusgps/django/forms/fields.py,sha256=BfuPzOZyGvWsEzONW2h4i01fhoL0IS0-gDdBKW4jHgI,2225
|
|
30
30
|
terminusgps/django/forms/forms.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
+
terminusgps/django/forms/renderer.py,sha256=QSLQ94Ff7ZaV1jD6wAL-ltvdKIblED8Wsv5EXvSbUJ4,394
|
|
31
32
|
terminusgps/django/forms/widgets.py,sha256=Hu6jNVx0i8JOOvAV1tuSHRqNI3mV2wijuKupUhol46c,1765
|
|
32
33
|
terminusgps/django/tests/test_forms.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
33
34
|
terminusgps/django/tests/test_mixins.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -38,7 +39,7 @@ terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
38
39
|
terminusgps/wialon/constants.py,sha256=05pLc_0S-x0tT87cQcxOmr8plesjOQxoXfUdjIHwI90,7732
|
|
39
40
|
terminusgps/wialon/flags.py,sha256=M50EdhxQ8IMnJnU0mrHK7-h8Asc6tvNiTOOfd1dBW6A,12815
|
|
40
41
|
terminusgps/wialon/session.py,sha256=eWRAWEikYdGr-0xa6yGHfTAxlCx9-1vsZDNwNZUJjZM,13771
|
|
41
|
-
terminusgps/wialon/utils.py,sha256=
|
|
42
|
+
terminusgps/wialon/utils.py,sha256=ntHLAVJSJBdIgJK704xxFNFRopaFz-No9YZZOMmvWO8,11627
|
|
42
43
|
terminusgps/wialon/validators.py,sha256=j5vrtcfClAzRdRkWTvRRAmrne1t0R6cKkmYdE7fAkSs,4247
|
|
43
44
|
terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
|
|
44
45
|
terminusgps/wialon/items/base.py,sha256=vS8xIo5WLiwzpB81i7aHFnwOHzCf4lQG6azjq79HDM4,11775
|
|
@@ -52,7 +53,7 @@ terminusgps/wialon/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
52
53
|
terminusgps/wialon/tests/test_items.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
54
|
terminusgps/wialon/tests/test_session.py,sha256=9mBlYchMo9NeqRIZsmxYzrM1zBHorqu4ooxqSNppLpI,1336
|
|
54
55
|
terminusgps/wialon/tests/test_utils.py,sha256=SK4PxJQGECFnzx_EQeRAQfsQ5_3FLaVcis2W9u_ibuI,1730
|
|
55
|
-
python_terminusgps-
|
|
56
|
-
python_terminusgps-
|
|
57
|
-
python_terminusgps-
|
|
58
|
-
python_terminusgps-
|
|
56
|
+
python_terminusgps-37.0.0.dist-info/METADATA,sha256=gSJ_ajG7w0h1nKrJnNd2LYwzLOb6XlIiVnL4ibmwO7c,1264
|
|
57
|
+
python_terminusgps-37.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
58
|
+
python_terminusgps-37.0.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
59
|
+
python_terminusgps-37.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from django.conf import settings
|
|
2
|
+
from django.core.exceptions import ImproperlyConfigured
|
|
3
|
+
from django.forms.renderers import TemplatesSetting
|
|
4
|
+
|
|
5
|
+
if settings.configured and not hasattr(settings, "DEFAULT_FIELD_CLASS"):
|
|
6
|
+
raise ImproperlyConfigured("'DEFAULT_FIELD_CLASS' setting is required.")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TerminusgpsFormRenderer(TemplatesSetting):
|
|
10
|
+
field_template_name = "terminusgps/field.html"
|
terminusgps/django/settings.py
CHANGED
|
@@ -16,3 +16,4 @@ TWILIO_SID = os.getenv("TWILIO_SID")
|
|
|
16
16
|
TWILIO_TOKEN = os.getenv("TWILIO_TOKEN")
|
|
17
17
|
WIALON_ADMIN_ID = os.getenv("WIALON_ADMIN_ID")
|
|
18
18
|
WIALON_TOKEN = os.getenv("WIALON_TOKEN")
|
|
19
|
+
DEFAULT_FIELD_CLASS = "p-2 w-full bg-white dark:bg-gray-700 dark:text-white rounded border dark:border-terminus-gray-300"
|
terminusgps/wialon/utils.py
CHANGED
|
@@ -7,6 +7,29 @@ from .items import WialonResource, WialonUnit
|
|
|
7
7
|
from .session import WialonSession
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
def get_hw_types(session: WialonSession) -> list[dict[str, str | int]]:
|
|
11
|
+
"""
|
|
12
|
+
Returns a list of hardware type objects for Wialon.
|
|
13
|
+
|
|
14
|
+
:param session: A valid Wialon API session.
|
|
15
|
+
:type session: :py:obj:`~terminusgps.wialon.session.WialonSession`
|
|
16
|
+
:returns: A list of hardware types.
|
|
17
|
+
:rtype: :py:obj:`list`
|
|
18
|
+
|
|
19
|
+
Hardware type format:
|
|
20
|
+
|
|
21
|
+
+----------+--------------------+
|
|
22
|
+
| key | value |
|
|
23
|
+
+==========+====================+
|
|
24
|
+
| ``id`` | Hardware type id |
|
|
25
|
+
+----------+--------------------+
|
|
26
|
+
| ``name`` | Hardware type name |
|
|
27
|
+
+----------+--------------------+
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
return session.wialon_api.core_get_hw_types()
|
|
31
|
+
|
|
32
|
+
|
|
10
33
|
def get_user_by_name(name: str, session: WialonSession) -> WialonUnit | None:
|
|
11
34
|
"""
|
|
12
35
|
Returns a Wialon user by name, if it exists.
|
|
File without changes
|
{python_terminusgps-36.9.3.dist-info → python_terminusgps-37.0.0.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|