python-terminusgps 20.4.1__tar.gz → 20.5.1__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 (63) hide show
  1. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/PKG-INFO +1 -1
  2. python_terminusgps-20.5.1/docs/source/authorizenet/auth.rst +33 -0
  3. python_terminusgps-20.5.1/docs/source/authorizenet/index.rst +11 -0
  4. python_terminusgps-20.5.1/docs/source/authorizenet/profiles.rst +22 -0
  5. python_terminusgps-20.5.1/docs/source/aws/index.rst +10 -0
  6. python_terminusgps-20.5.1/docs/source/aws/secrets.rst +17 -0
  7. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/docs/source/conf.py +9 -1
  8. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/docs/source/index.rst +3 -5
  9. python_terminusgps-20.5.1/docs/source/twilio/caller.rst +47 -0
  10. python_terminusgps-20.5.1/docs/source/twilio/index.rst +10 -0
  11. python_terminusgps-20.5.1/docs/source/wialon/constants.rst +19 -0
  12. python_terminusgps-20.5.1/docs/source/wialon/errors.rst +8 -0
  13. python_terminusgps-20.5.1/docs/source/wialon/examples.rst +118 -0
  14. python_terminusgps-20.5.1/docs/source/wialon/flags.rst +190 -0
  15. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/docs/source/wialon/index.rst +5 -6
  16. python_terminusgps-20.5.1/docs/source/wialon/items.rst +29 -0
  17. python_terminusgps-20.5.1/docs/source/wialon/session.rst +37 -0
  18. python_terminusgps-20.5.1/docs/source/wialon/settings.rst +59 -0
  19. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/docs/source/wialon/utils.rst +3 -10
  20. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/pyproject.toml +1 -1
  21. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/session.py +0 -17
  22. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/uv.lock +1 -1
  23. python_terminusgps-20.4.1/docs/source/authorizenet/index.rst +0 -0
  24. python_terminusgps-20.4.1/docs/source/aws/index.rst +0 -0
  25. python_terminusgps-20.4.1/docs/source/twilio/index.rst +0 -0
  26. python_terminusgps-20.4.1/docs/source/wialon/constants.rst +0 -6
  27. python_terminusgps-20.4.1/docs/source/wialon/flags.rst +0 -6
  28. python_terminusgps-20.4.1/docs/source/wialon/glossary.rst +0 -2
  29. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/.gitignore +0 -0
  30. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/COPYING +0 -0
  31. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/README.md +0 -0
  32. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/docs/Makefile +0 -0
  33. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/docs/make.bat +0 -0
  34. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/__init__.py +0 -0
  35. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/__init__.py +0 -0
  36. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/auth.py +0 -0
  37. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/profiles/__init__.py +0 -0
  38. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/profiles/addresses.py +0 -0
  39. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/profiles/base.py +0 -0
  40. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/profiles/customers.py +0 -0
  41. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/profiles/payments.py +0 -0
  42. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/authorizenet/subscriptions.py +0 -0
  43. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/aws/__init__.py +0 -0
  44. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/aws/secrets.py +0 -0
  45. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/aws/ses.py +0 -0
  46. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/settings.py +0 -0
  47. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/twilio/__init__.py +0 -0
  48. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/twilio/caller.py +0 -0
  49. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/__init__.py +0 -0
  50. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/constants.py +0 -0
  51. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/flags.py +0 -0
  52. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/__init__.py +0 -0
  53. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/base.py +0 -0
  54. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/geofence.py +0 -0
  55. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/notification.py +0 -0
  56. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/resource.py +0 -0
  57. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/retranslator.py +0 -0
  58. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/route.py +0 -0
  59. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/unit.py +0 -0
  60. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/unit_group.py +0 -0
  61. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/items/user.py +0 -0
  62. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/logger.py +0 -0
  63. {python_terminusgps-20.4.1 → python_terminusgps-20.5.1}/terminusgps/wialon/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 20.4.1
3
+ Version: 20.5.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://app.terminusgps.com/docs/apps/python-terminusgps/index.html
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -0,0 +1,33 @@
1
+ Authorizenet API Authentication
2
+ ===============================
3
+
4
+ To authorize with the Authorizenet API, use these utility functions to provide data to each API call.
5
+
6
+ .. currentmodule:: terminusgps.authorizenet.auth
7
+
8
+ .. py:function:: get_merchant_auth() -> merchantAuthenticationType
9
+
10
+ Generates and returns a :py:obj:`~authorizenet.apicontractsv1.merchantAuthenticationType` object.
11
+
12
+ This object is generated using :confval:`MERCHANT_AUTH_LOGIN_ID` and :confval:`MERCHANT_AUTH_TRANSACTION_KEY`.
13
+
14
+ :returns: A merchant authentication object.
15
+ :rtype: :py:obj:`~authorizenet.apicontractsv1.merchantAuthenticationType`
16
+
17
+ .. py:function:: get_environment() -> str
18
+
19
+ Gets the current application environment for Authorizenet API calls.
20
+
21
+ This string is generated using :confval:`DEBUG`.
22
+
23
+ :returns: The current Authorizenet API environment.
24
+ :rtype: :py:obj:`str`
25
+
26
+ .. py:function:: get_validation_mode() -> str
27
+
28
+ Gets the current application validation mode for Authorizenet API calls.
29
+
30
+ This string is generated using :confval:`DEBUG`.
31
+
32
+ :returns: The current Authorizenet API validation mode.
33
+ :rtype: :py:obj:`str`
@@ -0,0 +1,11 @@
1
+ Authorizenet API
2
+ ================
3
+
4
+ :py:mod:`terminusgps` offers the :py:mod:`authorizenet` package; a Python library that makes it simple to operate within the Authorizenet API.
5
+
6
+ .. toctree::
7
+ :maxdepth: 2
8
+ :caption: Contents:
9
+
10
+ auth.rst
11
+ profiles.rst
@@ -0,0 +1,22 @@
1
+ Profiles
2
+ ========
3
+
4
+ .. autoclass:: terminusgps.authorizenet.profiles.base.AuthorizenetProfileBase
5
+ :members:
6
+ :private-members:
7
+
8
+ .. autoclass:: terminusgps.authorizenet.profiles.base.AuthorizenetSubProfileBase
9
+ :members:
10
+ :private-members:
11
+
12
+ .. autoclass:: terminusgps.authorizenet.profiles.addresses.AddressProfile
13
+ :members:
14
+ :private-members:
15
+
16
+ .. autoclass:: terminusgps.authorizenet.profiles.customers.CustomerProfile
17
+ :members:
18
+ :private-members:
19
+
20
+ .. autoclass:: terminusgps.authorizenet.profiles.payments.PaymentProfile
21
+ :members:
22
+ :private-members:
@@ -0,0 +1,10 @@
1
+ AWS API
2
+ =======
3
+
4
+ :py:mod:`terminusgps` offers the :py:mod:`aws` package; a Python library that makes it simple to operate within the AWS API.
5
+
6
+ .. toctree::
7
+ :maxdepth: 2
8
+ :caption: Contents:
9
+
10
+ secrets.rst
@@ -0,0 +1,17 @@
1
+ Secrets
2
+ =======
3
+
4
+ .. currentmodule:: terminusgps.aws.secrets
5
+
6
+ .. py:function:: get_secret(name, [region="us-east-1"]) -> dict[str, str]
7
+
8
+ Logs into the default AWS CLI session and returns a secret value by name.
9
+
10
+ :param name: An AWS `secretsmanager`_ secret name.
11
+ :type name: :py:obj:`str`
12
+ :param region: An AWS region name. Default is ``"us-east-1"``.
13
+ :type region: :py:obj:`str`
14
+ :returns: The secret as a dictionary.
15
+ :rtype: :py:obj:`dict`
16
+
17
+ .. _secretsmanager: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/secretsmanager.html
@@ -9,7 +9,7 @@
9
9
  project = "python-terminusgps"
10
10
  copyright = "2025, Terminus GPS, LLC"
11
11
  author = "Terminus GPS, LLC"
12
- release = "20.4.0"
12
+ release = "20.5.0"
13
13
 
14
14
  # -- General configuration ---------------------------------------------------
15
15
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -21,6 +21,14 @@ extensions = [
21
21
  "sphinx.ext.viewcode",
22
22
  ]
23
23
 
24
+ intersphinx_mapping = {
25
+ "python": ("https://docs.python.org/3", None),
26
+ "django": (
27
+ "http://docs.djangoproject.com/en/stable/",
28
+ "http://docs.djangoproject.com/en/stable/_objects/",
29
+ ),
30
+ }
31
+
24
32
  templates_path = ["_templates"]
25
33
  exclude_patterns = []
26
34
 
@@ -6,13 +6,11 @@
6
6
  python-terminusgps documentation
7
7
  ================================
8
8
 
9
- Add your content using ``reStructuredText`` syntax. See the
10
- `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
11
- documentation for details.
12
-
13
-
14
9
  .. toctree::
15
10
  :maxdepth: 2
16
11
  :caption: Contents:
17
12
 
13
+ authorizenet/index.rst
14
+ aws/index.rst
15
+ twilio/index.rst
18
16
  wialon/index.rst
@@ -0,0 +1,47 @@
1
+ Caller object
2
+ =============
3
+
4
+
5
+ .. currentmodule:: terminusgps.twilio.caller
6
+
7
+ .. py:class:: TwilioCaller
8
+
9
+ An asyncronous phone messager/caller.
10
+
11
+ .. py:method:: create_notification(to_number, message, [method="sms"]) -> asyncio.Task
12
+
13
+ Creates a task that must be awaited in an asyncronous event loop in order to be executed.
14
+
15
+ :meta async:
16
+ :param to_number: A phone number, starting with a '+' and country code.
17
+ :type to_number: :py:obj:`str`
18
+ :param message: A message to send to `to_number`.
19
+ :type message: :py:obj:`str`
20
+ :param method: Notification method to use. Default is ``"sms"``.
21
+ :type method: :py:obj:`str`
22
+ :returns: An awaitable notification task.
23
+ :rtype: :py:obj:`asyncio.Task`
24
+
25
+ .. py:method:: create_call(to_number, message) -> None
26
+
27
+ Creates a phone call task.
28
+
29
+ :meta async:
30
+ :param to_number: A phone number, starting with a '+' and country code.
31
+ :type to_number: :py:obj:`str`
32
+ :param message: A message to send to `to_number`.
33
+ :type message: :py:obj:`str`
34
+ :returns: Nothing.
35
+ :rtype: :py:obj:`None`
36
+
37
+ .. py:method:: create_sms(to_number, message) -> None
38
+
39
+ Creates an sms message task.
40
+
41
+ :meta async:
42
+ :param to_number: A phone number, starting with a '+' and country code.
43
+ :type to_number: :py:obj:`str`
44
+ :param message: A message to send to `to_number`.
45
+ :type message: :py:obj:`str`
46
+ :returns: Nothing.
47
+ :rtype: :py:obj:`None`
@@ -0,0 +1,10 @@
1
+ Twilio API
2
+ ==========
3
+
4
+ :py:mod:`terminusgps` offers the :py:mod:`twilio` package; a Python library that makes it simple to operate within the Twilio API.
5
+
6
+ .. toctree::
7
+ :maxdepth: 2
8
+ :caption: Contents:
9
+
10
+ caller.rst
@@ -0,0 +1,19 @@
1
+ Constants
2
+ =========
3
+
4
+ .. currentmodule:: terminusgps.wialon.constants
5
+
6
+ .. py:data:: ACCESSMASK_RESOURCE_BASIC
7
+
8
+ :type: :py:obj:`int`
9
+ :value: ``17604054880353``
10
+
11
+ .. py:data:: ACCESSMASK_UNIT_BASIC
12
+
13
+ :type: :py:obj:`int`
14
+ :value: ``3540009843``
15
+
16
+ .. py:data:: ACCESSMASK_UNIT_MIGRATION
17
+
18
+ :type: :py:obj:`int`
19
+ :value: ``9437197``
@@ -0,0 +1,8 @@
1
+ Errors
2
+ ======
3
+
4
+ .. currentmodule:: wialon.api
5
+
6
+ .. py:exception:: WialonError
7
+
8
+ Raised when something goes wrong calling the Wialon API.
@@ -0,0 +1,118 @@
1
+ Usage Examples
2
+ ==============
3
+
4
+ ===============================
5
+ Create a new unit and rename it
6
+ ===============================
7
+
8
+ 1. Import :py:obj:`~terminusgps.wialon.session.WialonSession` and :py:obj:`~terminusgps.wialon.items.WialonUnit`.
9
+
10
+ Let's also import :py:obj:`~terminusgps.wialon.utils.generate_wialon_password` so we don't have to come up with a valid Wialon password ourselves.
11
+
12
+ .. code:: python
13
+
14
+ from terminusgps.wialon.session import WialonSession
15
+ from terminusgps.wialon.items import WialonUnit
16
+ from terminusgps.wialon.utils import generate_wialon_password
17
+
18
+ 2. Open the session in a context manager and instantiate a unit.
19
+
20
+ .. code:: python
21
+
22
+ with WialonSession(token="my_wialon_api_token") as session:
23
+ unit = WialonUnit(
24
+ id=None,
25
+ session=session,
26
+ creator_id="123",
27
+ name="test_user",
28
+ password=generate_wialon_password(32)
29
+ )
30
+ print(f"{unit.name = }") # unit.name = "test_user"
31
+
32
+ 3. Within the context manager, :py:obj:`~terminusgps.wialon.items.WialonUnit` methods can be executed.
33
+
34
+ .. code:: python
35
+
36
+ with WialonSession(token="my_secure_wialon_token") as session:
37
+ ...
38
+
39
+ unit.rename("super_test_user")
40
+ # Session is logged out after exiting scope
41
+
42
+ -----------------
43
+ Full code example
44
+ -----------------
45
+
46
+ .. code:: python
47
+
48
+ from terminusgps.wialon.session import WialonSession
49
+ from terminusgps.wialon.items import WialonUnit
50
+ from terminusgps.wialon.utils import generate_wialon_password
51
+
52
+ with WialonSession(token="my_secure_wialon_token") as session:
53
+ unit = WialonUnit(
54
+ id=None,
55
+ session=session,
56
+ creator_id="123",
57
+ name="test_user",
58
+ password=generate_wialon_password(32)
59
+ )
60
+ unit.rename("super_test_user")
61
+
62
+
63
+ ============================================
64
+ Create an account and migrate a unit into it
65
+ ============================================
66
+
67
+ 1. Import :py:obj:`~terminusgps.wialon.session.WialonSession` and :py:obj:`~terminusgps.wialon.items`.
68
+
69
+ .. code:: python
70
+
71
+ from terminusgps.wialon.session import WialonSession
72
+ from terminusgps.wialon import items
73
+
74
+ 2. Create an account user.
75
+
76
+ .. code:: python
77
+
78
+ with WialonSession(token="my_secure_wialon_token") as session:
79
+
80
+
81
+ -----------------
82
+ Full code example
83
+ -----------------
84
+
85
+ .. code:: python
86
+
87
+ from django.conf import settings
88
+
89
+ from terminusgps.wialon import items, constants
90
+ from terminusgps.wialon.session import WialonSession
91
+ from terminusgps.wialon.utils import generate_wialon_password, get_hw_type_id
92
+
93
+ with WialonSession(token="my_secure_wialon_token") as session:
94
+ hw_type_id = get_hw_type_id("Test HW", session)
95
+
96
+ account_user = items.WialonUser(
97
+ id=None,
98
+ session=session,
99
+ creator_id=settings.WIALON_ADMIN_ID,
100
+ name="account_user",
101
+ password=generate_wialon_password(32),
102
+ )
103
+ account_resource = items.WialonResource(
104
+ id=None,
105
+ session=session,
106
+ creator_id=account_user.id, # Use the new account user to create this resource
107
+ name="account_resource",
108
+ )
109
+ unit = WialonUnit(
110
+ id=None,
111
+ session=session,
112
+ creator_id=settings.WIALON_ADMIN_ID, # Account user CANNOT create the unit
113
+ name="test_unit",
114
+ hw_type_id=hw_type_id,
115
+ )
116
+
117
+ account_user.grant_access(unit, access_mask=constants.ACCESSMASK_UNIT_MIGRATION)
118
+ account_resource.migrate_unit(unit)
@@ -0,0 +1,190 @@
1
+ Flags
2
+ =====
3
+
4
+ .. automodule:: terminusgps.wialon.flags
5
+
6
+ .. currentmodule:: terminusgps.wialon.flags
7
+
8
+ ============
9
+ Access Flags
10
+ ============
11
+
12
+ -------
13
+ General
14
+ -------
15
+
16
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#general>`_
17
+
18
+ .. py:data:: ACCESSFLAG_VIEW_ITEM_BASIC
19
+ .. py:data:: ACCESSFLAG_VIEW_ITEM_DETAILED
20
+ .. py:data:: ACCESSFLAG_MANAGE_ITEM_ACCESS
21
+ .. py:data:: ACCESSFLAG_DELETE_ITEM
22
+ .. py:data:: ACCESSFLAG_RENAME_ITEM
23
+ .. py:data:: ACCESSFLAG_VIEW_CUSTOM_FIELDS
24
+ .. py:data:: ACCESSFLAG_MANAGE_CUSTOM_FIELDS
25
+ .. py:data:: ACCESSFLAG_MANAGE_UNMENTIONED_FIELDS
26
+ .. py:data:: ACCESSFLAG_MANAGE_ICON
27
+ .. py:data:: ACCESSFLAG_QUERY_REPORTS
28
+ .. py:data:: ACCESSFLAG_MANAGE_ACL
29
+ .. py:data:: ACCESSFLAG_MANAGE_ITEM_LOG
30
+ .. py:data:: ACCESSFLAG_VIEW_ADMIN_FIELDS
31
+ .. py:data:: ACCESSFLAG_MANAGE_ADMIN_FIELDS
32
+ .. py:data:: ACCESSFLAG_VIEW_ATTACHED_FILES
33
+ .. py:data:: ACCESSFLAG_MANAGE_ATTACHED_FILES
34
+
35
+ ---------------
36
+ Unit/Unit Group
37
+ ---------------
38
+
39
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#units_and_unit_groups>`_
40
+
41
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_CONNECTIVITY
42
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_SENSORS
43
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_COUNTERS
44
+ .. py:data:: ACCESSFLAG_UNIT_DELETE_MESSAGES
45
+ .. py:data:: ACCESSFLAG_UNIT_EXECUTE_COMMANDS
46
+ .. py:data:: ACCESSFLAG_UNIT_REGISTER_EVENTS
47
+ .. py:data:: ACCESSFLAG_UNIT_VIEW_CONNECTIVITY
48
+ .. py:data:: ACCESSFLAG_UNIT_VIEW_SERVICE_INTERVALS
49
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_SERVICE_INTERVALS
50
+ .. py:data:: ACCESSFLAG_UNIT_IMPORT_MESSAGES
51
+ .. py:data:: ACCESSFLAG_UNIT_EXPORT_MESSAGES
52
+ .. py:data:: ACCESSFLAG_UNIT_VIEW_COMMANDS
53
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_COMMANDS
54
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_TRIP_DETECTOR
55
+ .. py:data:: ACCESSFLAG_UNIT_MANAGE_ASSIGNMENTS
56
+
57
+ ----
58
+ User
59
+ ----
60
+
61
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#users>`_
62
+
63
+ .. py:data:: ACCESSFLAG_USER_MANAGE_ACCESS_RIGHTS
64
+ .. py:data:: ACCESSFLAG_USER_ACT_AS_OTHER
65
+ .. py:data:: ACCESSFLAG_USER_MANAGE_FLAGS
66
+ .. py:data:: ACCESSFLAG_USER_VIEW_PUSH_MESSAGES
67
+ .. py:data:: ACCESSFLAG_USER_MANAGE_PUSH_MESSAGES
68
+
69
+ ------------
70
+ Retranslator
71
+ ------------
72
+
73
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#retranslators>`_
74
+
75
+ .. py:data:: ACCESSFLAG_RETRANSLATOR_MANAGE_PROPERTIES
76
+ .. py:data:: ACCESSFLAG_RETRANSLATOR_MANAGE_UNITS
77
+
78
+ ------------------
79
+ Resources/Accounts
80
+ ------------------
81
+
82
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#resources_accounts>`_
83
+
84
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_NOTIFICATIONS
85
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_NOTIFICATIONS
86
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_POIS
87
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_POIS
88
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_GEOFENCES
89
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_GEOFENCES
90
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_JOBS
91
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_JOBS
92
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_REPORT_TEMPLATES
93
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_REPORT_TEMPLATES
94
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_DRIVERS
95
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_DRIVERS
96
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_ACCOUNT
97
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_ORDERS
98
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_ORDERS
99
+ .. py:data:: ACCESSFLAG_RESOURCE_VIEW_TRAILERS
100
+ .. py:data:: ACCESSFLAG_RESOURCE_MANAGE_TRAILERS
101
+
102
+ ------
103
+ Routes
104
+ ------
105
+
106
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#routes>`_
107
+
108
+ .. py:data:: ACCESSFLAG_ROUTE_MANAGE_ROUTE
109
+
110
+ -----
111
+ Other
112
+ -----
113
+
114
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#other>`_
115
+
116
+ .. py:data:: ACCESSFLAG_FULL_ACCESS
117
+
118
+ ==========
119
+ Data Flags
120
+ ==========
121
+
122
+ ------------
123
+ Retranslator
124
+ ------------
125
+
126
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/retranslator>`_
127
+
128
+ .. py:data:: DATAFLAG_RETRANSLATOR_BASE
129
+ .. py:data:: DATAFLAG_RETRANSLATOR_CUSTOM_PROPERTIES
130
+ .. py:data:: DATAFLAG_RETRANSLATOR_BILLING_PROPERTIES
131
+ .. py:data:: DATAFLAG_RETRANSLATOR_GUID
132
+ .. py:data:: DATAFLAG_RETRANSLATOR_ADMIN_FIELDS
133
+ .. py:data:: DATAFLAG_RETRANSLATOR_CONFIGURATION
134
+ .. py:data:: DATAFLAG_RETRANSLATOR_UNITS
135
+ .. py:data:: DATAFLAG_RETRANSLATOR_ALL
136
+
137
+
138
+ -----------------
139
+ Resource/Accounts
140
+ -----------------
141
+
142
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/resource>`_
143
+
144
+ .. py:data:: DATAFLAG_RESOURCE_BASE
145
+ .. py:data:: DATAFLAG_RESOURCE_CUSTOM_PROPERTIES
146
+ .. py:data:: DATAFLAG_RESOURCE_BILLING_PROPERTIES
147
+ .. py:data:: DATAFLAG_RESOURCE_CUSTOM_FIELDS
148
+ .. py:data:: DATAFLAG_RESOURCE_MESSAGES
149
+ .. py:data:: DATAFLAG_RESOURCE_GUID
150
+ .. py:data:: DATAFLAG_RESOURCE_ADMIN_FIELDS
151
+ .. py:data:: DATAFLAG_RESOURCE_DRIVERS
152
+ .. py:data:: DATAFLAG_RESOURCE_JOBS
153
+ .. py:data:: DATAFLAG_RESOURCE_NOTIFICATIONS
154
+ .. py:data:: DATAFLAG_RESOURCE_POIS
155
+ .. py:data:: DATAFLAG_RESOURCE_GEOFENCES
156
+ .. py:data:: DATAFLAG_RESOURCE_REPORT_TEMPLATES
157
+ .. py:data:: DATAFLAG_RESOURCE_DRIVER_ATTACHABLE_UNITS
158
+ .. py:data:: DATAFLAG_RESOURCE_DRIVER_GROUPS
159
+ .. py:data:: DATAFLAG_RESOURCE_TRAILERS
160
+ .. py:data:: DATAFLAG_RESOURCE_TRAILER_GROUPS
161
+ .. py:data:: DATAFLAG_RESOURCE_TRAILER_ATTACHABLE_UNITS
162
+ .. py:data:: DATAFLAG_RESOURCE_ORDERS
163
+ .. py:data:: DATAFLAG_RESOURCE_GEOFENCE_GROUPS
164
+ .. py:data:: DATAFLAG_RESOURCE_TAGS
165
+ .. py:data:: DATAFLAG_RESOURCE_TAG_ATTACHABLE_UNITS
166
+ .. py:data:: DATAFLAG_RESOURCE_TAG_GROUPS
167
+ .. py:data:: DATAFLAG_RESOURCE_ALL
168
+
169
+ -----
170
+ Route
171
+ -----
172
+
173
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/route>`_
174
+
175
+ .. py:data:: DATAFLAG_ROUTE_BASE
176
+ .. py:data:: DATAFLAG_ROUTE_CUSTOM_PROPERTIES
177
+ .. py:data:: DATAFLAG_ROUTE_BILLING_PROPERTIES
178
+ .. py:data:: DATAFLAG_ROUTE_GUID
179
+ .. py:data:: DATAFLAG_ROUTE_ADMIN_FIELDS
180
+ .. py:data:: DATAFLAG_ROUTE_CONFIGURATION
181
+ .. py:data:: DATAFLAG_ROUTE_CHECKPOINTS
182
+ .. py:data:: DATAFLAG_ROUTE_SCHEDULES
183
+ .. py:data:: DATAFLAG_ROUTE_ROUNDS
184
+ .. py:data:: DATAFLAG_ROUTE_ALL
185
+
186
+ ---------------
187
+ Unit/Unit Group
188
+ ---------------
189
+
190
+ `Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/unit>`_
@@ -1,8 +1,3 @@
1
- .. python-terminusgps documentation master file, created by
2
- sphinx-quickstart on Wed Feb 19 10:39:57 2025.
3
- You can adapt this file completely to your liking, but it should at least
4
- contain the root `toctree` directive.
5
-
6
1
  Wialon API
7
2
  ==========
8
3
 
@@ -13,6 +8,10 @@ Wialon API
13
8
  :caption: Contents:
14
9
 
15
10
  constants.rst
11
+ errors.rst
12
+ examples.rst
16
13
  flags.rst
17
- glossary.rst
14
+ items.rst
15
+ session.rst
16
+ settings.rst
18
17
  utils.rst
@@ -0,0 +1,29 @@
1
+ Items
2
+ =====
3
+
4
+ .. autoclass:: terminusgps.wialon.items.base.WialonBase
5
+ :members:
6
+
7
+ .. autoclass:: terminusgps.wialon.items.geofence.WialonGeofence
8
+ :members:
9
+
10
+ .. autoclass:: terminusgps.wialon.items.notification.WialonNotification
11
+ :members:
12
+
13
+ .. autoclass:: terminusgps.wialon.items.resource.WialonResource
14
+ :members:
15
+
16
+ .. autoclass:: terminusgps.wialon.items.retranslator.WialonRetranslator
17
+ :members:
18
+
19
+ .. autoclass:: terminusgps.wialon.items.route.WialonRoute
20
+ :members:
21
+
22
+ .. autoclass:: terminusgps.wialon.items.unit.WialonUnit
23
+ :members:
24
+
25
+ .. autoclass:: terminusgps.wialon.items.unit_group.WialonUnitGroup
26
+ :members:
27
+
28
+ .. autoclass:: terminusgps.wialon.items.user.WialonUser
29
+ :members:
@@ -0,0 +1,37 @@
1
+ Wialon API Sessions
2
+ ===================
3
+
4
+ .. autoclass:: terminusgps.wialon.session.WialonSession
5
+ :members:
6
+
7
+ .. autoclass:: terminusgps.wialon.session.WialonSessionManager
8
+ :members:
9
+
10
+
11
+ =====
12
+ Usage
13
+ =====
14
+
15
+ .. code:: python
16
+
17
+ from terminusgps.wialon.session import WialonSession
18
+
19
+ # Create a session and login to it
20
+ session = WialonSession()
21
+ session.login(token="my_secure_token")
22
+
23
+ # Use the logged in session to perform API actions
24
+ session.wialon_api.core_search_item(**{"id": "123", "flags": 1})
25
+
26
+ # Don't forget to logout of the session
27
+ # Sessions are destroyed after 5min of inactivity
28
+ session.logout()
29
+
30
+ # Alternatively, use a context manager
31
+ # The context manager handles logging in and out of the session.
32
+ with WialonSession() as session:
33
+ session.wialon_api.core_search_item(**{"id": "123", "flags": 1})
34
+
35
+ # If you already have a session id, no need to login again
36
+ session = WialonSession(sid="my_valid_session_id")
37
+ session.wialon_api.core_search_item(**{"id": "123", "flags": 1})
@@ -0,0 +1,59 @@
1
+ Settings
2
+ ========
3
+
4
+ .. confval:: DEBUG
5
+
6
+ :type: :py:obj:`bool`
7
+ :default: :py:obj:`True`
8
+
9
+ Debug mode enabled.
10
+
11
+ .. confval:: MERCHANT_AUTH_LOGIN_ID
12
+
13
+ :type: :py:obj:`str`
14
+
15
+ An authorizenet merchant authentication login id.
16
+
17
+ .. confval:: MERCHANT_AUTH_TRANSACTION_KEY
18
+
19
+ :type: :py:obj:`str`
20
+
21
+ An authorizenet merchant authentication transaction key.
22
+
23
+ This key signs all Authorizenet transactions.
24
+
25
+ .. confval:: TWILIO_FROM_NUMBER
26
+
27
+ :type: :py:obj:`str`
28
+
29
+ A phone number to send Twilio notifications from.
30
+
31
+ .. confval:: TWILIO_MESSAGING_SID
32
+
33
+ :type: :py:obj:`str`
34
+
35
+ A Twilio API messaging session id.
36
+
37
+ .. confval:: TWILIO_SID
38
+
39
+ :type: :py:obj:`str`
40
+
41
+ A Twilio API session id.
42
+
43
+ .. confval:: TWILIO_TOKEN
44
+
45
+ :type: :py:obj:`str`
46
+
47
+ A Twilio API token.
48
+
49
+ .. confval:: WIALON_ADMIN_ID
50
+
51
+ :type: :py:obj:`str`
52
+
53
+ A Wialon user id to operate as during Wialon API session.
54
+
55
+ .. confval:: WIALON_TOKEN
56
+
57
+ :type: :py:obj:`str`
58
+
59
+ An active Wialon API token.
@@ -5,16 +5,9 @@ Utilities
5
5
  Functions
6
6
  =========
7
7
 
8
- .. currentmodule:: terminusgps.wialon.utils
9
-
10
- .. autosummary::
11
-
12
- get_hw_type_id
13
- get_id_from_iccid
14
- get_wialon_cls
15
- get_vin_info
16
- is_unique
17
- generate_wialon_password
8
+ .. automodule:: terminusgps.wialon.utils
9
+ :members:
10
+ :exclude-members: gen_wialon_password
18
11
 
19
12
  =====
20
13
  Usage
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-terminusgps"
3
- version = "20.4.1"
3
+ version = "20.5.1"
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" } ]
@@ -342,20 +342,3 @@ class WialonSessionManager:
342
342
  if not self._session:
343
343
  self._session = WialonSession(sid=sid, log_level=log_level)
344
344
  return self._session
345
-
346
-
347
- def main() -> None:
348
- # Usage example
349
- session = WialonSession(log_level=logging.DEBUG) # Instantiate session
350
- session.login(settings.WIALON_TOKEN) # Login to session
351
- session.wialon_api.avl_evts() # Call Wialon API
352
- session.logout() # Logout of session
353
-
354
- # Alternatively, use a context manager to handle logging in and out
355
- with WialonSession() as session:
356
- session.wialon_api.avl_evts() # Call Wialon API, logout when scope ends
357
- return
358
-
359
-
360
- if __name__ == "__main__":
361
- main()
@@ -504,7 +504,7 @@ wheels = [
504
504
 
505
505
  [[package]]
506
506
  name = "python-terminusgps"
507
- version = "20.4.1"
507
+ version = "20.5.1"
508
508
  source = { editable = "." }
509
509
  dependencies = [
510
510
  { name = "argparse" },
File without changes
File without changes
@@ -1,6 +0,0 @@
1
- Constants
2
- =========
3
-
4
- .. autosummary::
5
-
6
- terminusgps.wialon.constants
@@ -1,6 +0,0 @@
1
- Flags
2
- =====
3
-
4
- .. autosummary::
5
-
6
- terminusgps.wialon.flags
@@ -1,2 +0,0 @@
1
- Glossary
2
- ========