python-terminusgps 20.5.0__tar.gz → 20.5.2__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.
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/.gitignore +1 -0
- python_terminusgps-20.5.2/.readthedocs.yaml +22 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/PKG-INFO +1 -1
- python_terminusgps-20.5.2/docs/requirements.txt +54 -0
- python_terminusgps-20.5.2/docs/source/authorizenet/profiles.rst +22 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/conf.py +3 -2
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/index.rst +17 -0
- python_terminusgps-20.5.2/docs/source/wialon/examples.rst +161 -0
- python_terminusgps-20.5.2/docs/source/wialon/flags.rst +274 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/wialon/index.rst +4 -0
- python_terminusgps-20.5.2/docs/source/wialon/items.rst +29 -0
- python_terminusgps-20.5.2/docs/source/wialon/session.rst +38 -0
- python_terminusgps-20.5.2/docs/source/wialon/settings.rst +59 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/wialon/utils.rst +3 -10
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/pyproject.toml +2 -2
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/flags.py +299 -150
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/session.py +0 -17
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/uv.lock +102 -68
- python_terminusgps-20.5.0/docs/source/authorizenet/profiles.rst +0 -2
- python_terminusgps-20.5.0/docs/source/wialon/flags.rst +0 -188
- python_terminusgps-20.5.0/docs/source/wialon/items.rst +0 -537
- python_terminusgps-20.5.0/docs/source/wialon/session.rst +0 -155
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/COPYING +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/README.md +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/Makefile +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/make.bat +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/authorizenet/auth.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/authorizenet/index.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/aws/index.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/aws/secrets.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/twilio/caller.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/twilio/index.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/wialon/constants.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/docs/source/wialon/errors.rst +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/auth.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/profiles/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/profiles/addresses.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/profiles/base.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/profiles/customers.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/profiles/payments.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/authorizenet/subscriptions.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/aws/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/aws/secrets.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/aws/ses.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/settings.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/twilio/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/twilio/caller.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/constants.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/__init__.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/base.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/geofence.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/notification.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/resource.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/retranslator.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/route.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/unit.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/unit_group.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/items/user.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/logger.py +0 -0
- {python_terminusgps-20.5.0 → python_terminusgps-20.5.2}/terminusgps/wialon/utils.py +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
# Required
|
|
5
|
+
version: 2
|
|
6
|
+
|
|
7
|
+
# Set the OS, Python version, and other tools you might need
|
|
8
|
+
build:
|
|
9
|
+
os: ubuntu-24.04
|
|
10
|
+
tools:
|
|
11
|
+
python: "3.13"
|
|
12
|
+
|
|
13
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
14
|
+
sphinx:
|
|
15
|
+
configuration: docs/source/conf.py
|
|
16
|
+
|
|
17
|
+
# Optionally, but recommended,
|
|
18
|
+
# declare the Python requirements required to build your documentation
|
|
19
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
20
|
+
python:
|
|
21
|
+
install:
|
|
22
|
+
- requirements: pyproject.toml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 20.5.
|
|
3
|
+
Version: 20.5.2
|
|
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,54 @@
|
|
|
1
|
+
aiohappyeyeballs==2.4.6
|
|
2
|
+
aiohttp==3.11.12
|
|
3
|
+
aiohttp-retry==2.9.1
|
|
4
|
+
aiosignal==1.3.2
|
|
5
|
+
alabaster==1.0.0
|
|
6
|
+
argparse==1.4.0
|
|
7
|
+
asgiref==3.8.1
|
|
8
|
+
attrs==25.1.0
|
|
9
|
+
authorizenet==1.1.5
|
|
10
|
+
babel==2.17.0
|
|
11
|
+
beautifulsoup4==4.13.3
|
|
12
|
+
boto3==1.36.23
|
|
13
|
+
botocore==1.36.23
|
|
14
|
+
certifi==2025.1.31
|
|
15
|
+
charset-normalizer==3.4.1
|
|
16
|
+
django==5.1.6
|
|
17
|
+
docutils==0.21.2
|
|
18
|
+
frozenlist==1.5.0
|
|
19
|
+
future==1.0.0
|
|
20
|
+
idna==3.10
|
|
21
|
+
imagesize==1.4.1
|
|
22
|
+
jinja2==3.1.5
|
|
23
|
+
jmespath==1.0.1
|
|
24
|
+
lxml==4.9.4
|
|
25
|
+
markupsafe==3.0.2
|
|
26
|
+
multidict==6.1.0
|
|
27
|
+
packaging==24.2
|
|
28
|
+
propcache==0.2.1
|
|
29
|
+
pygments==2.19.1
|
|
30
|
+
pyjwt==2.10.1
|
|
31
|
+
python-dateutil==2.9.0.post0
|
|
32
|
+
-e file:///home/blake/Projects/python-terminusgps
|
|
33
|
+
python-wialon==1.2.4
|
|
34
|
+
pyxb-x==1.2.6.3
|
|
35
|
+
requests==2.32.3
|
|
36
|
+
roman-numerals-py==3.0.0
|
|
37
|
+
s3transfer==0.11.2
|
|
38
|
+
simplejson==3.20.1
|
|
39
|
+
six==1.17.0
|
|
40
|
+
snowballstemmer==2.2.0
|
|
41
|
+
soupsieve==2.6
|
|
42
|
+
sphinx==8.2.0
|
|
43
|
+
sphinxawesome-theme==5.3.2
|
|
44
|
+
sphinxcontrib-applehelp==2.0.0
|
|
45
|
+
sphinxcontrib-devhelp==2.0.0
|
|
46
|
+
sphinxcontrib-htmlhelp==2.1.0
|
|
47
|
+
sphinxcontrib-jsmath==1.0.1
|
|
48
|
+
sphinxcontrib-qthelp==2.0.0
|
|
49
|
+
sphinxcontrib-serializinghtml==2.0.0
|
|
50
|
+
sqlparse==0.5.3
|
|
51
|
+
twilio==9.4.5
|
|
52
|
+
typing-extensions==4.12.2
|
|
53
|
+
urllib3==2.3.0
|
|
54
|
+
yarl==1.18.3
|
|
@@ -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:
|
|
@@ -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.5.
|
|
12
|
+
release = "20.5.1"
|
|
13
13
|
|
|
14
14
|
# -- General configuration ---------------------------------------------------
|
|
15
15
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
@@ -36,5 +36,6 @@ exclude_patterns = []
|
|
|
36
36
|
# -- Options for HTML output -------------------------------------------------
|
|
37
37
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
38
38
|
|
|
39
|
-
html_theme = "
|
|
39
|
+
html_theme = "sphinxawesome_theme"
|
|
40
|
+
html_permalinks_icon = "<span>#</span>"
|
|
40
41
|
html_static_path = ["_static"]
|
|
@@ -6,6 +6,23 @@
|
|
|
6
6
|
python-terminusgps documentation
|
|
7
7
|
================================
|
|
8
8
|
|
|
9
|
+
============
|
|
10
|
+
Installation
|
|
11
|
+
============
|
|
12
|
+
|
|
13
|
+
Use pip to install from `PyPI <https://pypi.org/project/python-terminusgps/>`_.
|
|
14
|
+
|
|
15
|
+
.. code:: bash
|
|
16
|
+
|
|
17
|
+
pip install python-terminusgps
|
|
18
|
+
|
|
19
|
+
In Python, all subpackages are nested within :py:mod:`terminusgps`:
|
|
20
|
+
|
|
21
|
+
.. code:: python
|
|
22
|
+
|
|
23
|
+
from terminusgps.aws.secrets import get_secret
|
|
24
|
+
from terminusgps.wialon.session import WialonSession
|
|
25
|
+
|
|
9
26
|
.. toctree::
|
|
10
27
|
:maxdepth: 2
|
|
11
28
|
:caption: Contents:
|
|
@@ -0,0 +1,161 @@
|
|
|
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`, :py:mod:`~terminusgps.wialon.items`, and :py:mod:`~terminusgps.wialon.constants`.
|
|
68
|
+
|
|
69
|
+
.. code:: python
|
|
70
|
+
|
|
71
|
+
from terminusgps.wialon.session import WialonSession
|
|
72
|
+
from terminusgps.wialon import items, constants
|
|
73
|
+
|
|
74
|
+
2. Create an account user.
|
|
75
|
+
|
|
76
|
+
.. code:: python
|
|
77
|
+
|
|
78
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
79
|
+
account_user = items.WialonUser(
|
|
80
|
+
id=None,
|
|
81
|
+
session=session,
|
|
82
|
+
creator_id="27884511", # Admin user id
|
|
83
|
+
name="account_user",
|
|
84
|
+
password="super_secure_password1!",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
3. Create a resource using the account user.
|
|
88
|
+
|
|
89
|
+
.. code:: python
|
|
90
|
+
|
|
91
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
92
|
+
...
|
|
93
|
+
account_resource = items.WialonResource(
|
|
94
|
+
id=None,
|
|
95
|
+
session=session,
|
|
96
|
+
creator_id=account_user.id,
|
|
97
|
+
name="account_resource",
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
4. Retrieve a :py:obj:`~terminusgps.wialon.items.unit.WialonUnit`.
|
|
101
|
+
|
|
102
|
+
.. code:: python
|
|
103
|
+
|
|
104
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
105
|
+
...
|
|
106
|
+
unit = items.WialonUnit(id="12345678", session=session)
|
|
107
|
+
|
|
108
|
+
5. Grant the account user migration permissions.
|
|
109
|
+
|
|
110
|
+
.. code:: python
|
|
111
|
+
|
|
112
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
113
|
+
...
|
|
114
|
+
account_user.grant_access(unit, access_mask=constants.ACCESSMASK_UNIT_MIGRATION)
|
|
115
|
+
|
|
116
|
+
6. Transform the resource into an account and enable it.
|
|
117
|
+
|
|
118
|
+
.. code:: python
|
|
119
|
+
|
|
120
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
121
|
+
...
|
|
122
|
+
account_resource.create_account("terminusgps_ext_hist")
|
|
123
|
+
account_resource.enable()
|
|
124
|
+
|
|
125
|
+
7. Migrate the unit into the account.
|
|
126
|
+
|
|
127
|
+
.. code:: python
|
|
128
|
+
|
|
129
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
130
|
+
...
|
|
131
|
+
account_resource.migrate_unit(unit)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
-----------------
|
|
135
|
+
Full code example
|
|
136
|
+
-----------------
|
|
137
|
+
|
|
138
|
+
.. code:: python
|
|
139
|
+
|
|
140
|
+
from terminusgps.wialon.session import WialonSession
|
|
141
|
+
from terminusgps.wialon import items, constants
|
|
142
|
+
|
|
143
|
+
with WialonSession(token="my_secure_wialon_token") as session:
|
|
144
|
+
account_user = items.WialonUser(
|
|
145
|
+
id=None,
|
|
146
|
+
session=session,
|
|
147
|
+
creator_id="27884511", # Admin user id
|
|
148
|
+
name="account_user",
|
|
149
|
+
password="super_secure_password1!",
|
|
150
|
+
)
|
|
151
|
+
account_resource = items.WialonResource(
|
|
152
|
+
id=None,
|
|
153
|
+
session=session,
|
|
154
|
+
creator_id=account_user.id,
|
|
155
|
+
name="account_resource",
|
|
156
|
+
)
|
|
157
|
+
unit = items.WialonUnit(id="12345678", session=session)
|
|
158
|
+
account_user.grant_access(unit, access_mask=constants.ACCESSMASK_UNIT_MIGRATION)
|
|
159
|
+
account_resource.create_account("terminusgps_ext_hist")
|
|
160
|
+
account_resource.enable()
|
|
161
|
+
account_resource.migrate_unit(unit)
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
Flags
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
.. currentmodule:: terminusgps.wialon.flags
|
|
5
|
+
|
|
6
|
+
============
|
|
7
|
+
Access Flags
|
|
8
|
+
============
|
|
9
|
+
|
|
10
|
+
-------
|
|
11
|
+
General
|
|
12
|
+
-------
|
|
13
|
+
|
|
14
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#general>`_
|
|
15
|
+
|
|
16
|
+
.. autodata:: ACCESSFLAG_VIEW_ITEM_BASIC
|
|
17
|
+
.. autodata:: ACCESSFLAG_VIEW_ITEM_DETAILED
|
|
18
|
+
.. autodata:: ACCESSFLAG_MANAGE_ITEM_ACCESS
|
|
19
|
+
.. autodata:: ACCESSFLAG_DELETE_ITEM
|
|
20
|
+
.. autodata:: ACCESSFLAG_RENAME_ITEM
|
|
21
|
+
.. autodata:: ACCESSFLAG_VIEW_CUSTOM_FIELDS
|
|
22
|
+
.. autodata:: ACCESSFLAG_MANAGE_CUSTOM_FIELDS
|
|
23
|
+
.. autodata:: ACCESSFLAG_MANAGE_UNMENTIONED_FIELDS
|
|
24
|
+
.. autodata:: ACCESSFLAG_MANAGE_ICON
|
|
25
|
+
.. autodata:: ACCESSFLAG_QUERY_REPORTS
|
|
26
|
+
.. autodata:: ACCESSFLAG_MANAGE_ACL
|
|
27
|
+
.. autodata:: ACCESSFLAG_MANAGE_ITEM_LOG
|
|
28
|
+
.. autodata:: ACCESSFLAG_VIEW_ADMIN_FIELDS
|
|
29
|
+
.. autodata:: ACCESSFLAG_MANAGE_ADMIN_FIELDS
|
|
30
|
+
.. autodata:: ACCESSFLAG_VIEW_ATTACHED_FILES
|
|
31
|
+
.. autodata:: ACCESSFLAG_MANAGE_ATTACHED_FILES
|
|
32
|
+
|
|
33
|
+
---------------
|
|
34
|
+
Unit/Unit Group
|
|
35
|
+
---------------
|
|
36
|
+
|
|
37
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#units_and_unit_groups>`_
|
|
38
|
+
|
|
39
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_CONNECTIVITY
|
|
40
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_SENSORS
|
|
41
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_COUNTERS
|
|
42
|
+
.. autodata:: ACCESSFLAG_UNIT_DELETE_MESSAGES
|
|
43
|
+
.. autodata:: ACCESSFLAG_UNIT_EXECUTE_COMMANDS
|
|
44
|
+
.. autodata:: ACCESSFLAG_UNIT_REGISTER_EVENTS
|
|
45
|
+
.. autodata:: ACCESSFLAG_UNIT_VIEW_CONNECTIVITY
|
|
46
|
+
.. autodata:: ACCESSFLAG_UNIT_VIEW_SERVICE_INTERVALS
|
|
47
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_SERVICE_INTERVALS
|
|
48
|
+
.. autodata:: ACCESSFLAG_UNIT_IMPORT_MESSAGES
|
|
49
|
+
.. autodata:: ACCESSFLAG_UNIT_EXPORT_MESSAGES
|
|
50
|
+
.. autodata:: ACCESSFLAG_UNIT_VIEW_COMMANDS
|
|
51
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_COMMANDS
|
|
52
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_TRIP_DETECTOR
|
|
53
|
+
.. autodata:: ACCESSFLAG_UNIT_MANAGE_ASSIGNMENTS
|
|
54
|
+
|
|
55
|
+
----
|
|
56
|
+
User
|
|
57
|
+
----
|
|
58
|
+
|
|
59
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#users>`_
|
|
60
|
+
|
|
61
|
+
.. autodata:: ACCESSFLAG_USER_MANAGE_ACCESS_RIGHTS
|
|
62
|
+
.. autodata:: ACCESSFLAG_USER_ACT_AS_OTHER
|
|
63
|
+
.. autodata:: ACCESSFLAG_USER_MANAGE_FLAGS
|
|
64
|
+
.. autodata:: ACCESSFLAG_USER_VIEW_PUSH_MESSAGES
|
|
65
|
+
.. autodata:: ACCESSFLAG_USER_MANAGE_PUSH_MESSAGES
|
|
66
|
+
|
|
67
|
+
------------
|
|
68
|
+
Retranslator
|
|
69
|
+
------------
|
|
70
|
+
|
|
71
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#retranslators>`_
|
|
72
|
+
|
|
73
|
+
.. autodata:: ACCESSFLAG_RETRANSLATOR_MANAGE_PROPERTIES
|
|
74
|
+
.. autodata:: ACCESSFLAG_RETRANSLATOR_MANAGE_UNITS
|
|
75
|
+
|
|
76
|
+
------------------
|
|
77
|
+
Resources/Accounts
|
|
78
|
+
------------------
|
|
79
|
+
|
|
80
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#resources_accounts>`_
|
|
81
|
+
|
|
82
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_NOTIFICATIONS
|
|
83
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_NOTIFICATIONS
|
|
84
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_POIS
|
|
85
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_POIS
|
|
86
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_GEOFENCES
|
|
87
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_GEOFENCES
|
|
88
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_JOBS
|
|
89
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_JOBS
|
|
90
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_REPORT_TEMPLATES
|
|
91
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_REPORT_TEMPLATES
|
|
92
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_DRIVERS
|
|
93
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_DRIVERS
|
|
94
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_ACCOUNT
|
|
95
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_ORDERS
|
|
96
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_ORDERS
|
|
97
|
+
.. autodata:: ACCESSFLAG_RESOURCE_VIEW_TRAILERS
|
|
98
|
+
.. autodata:: ACCESSFLAG_RESOURCE_MANAGE_TRAILERS
|
|
99
|
+
|
|
100
|
+
------
|
|
101
|
+
Routes
|
|
102
|
+
------
|
|
103
|
+
|
|
104
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#routes>`_
|
|
105
|
+
|
|
106
|
+
.. autodata:: ACCESSFLAG_ROUTE_MANAGE_ROUTE
|
|
107
|
+
|
|
108
|
+
-----
|
|
109
|
+
Other
|
|
110
|
+
-----
|
|
111
|
+
|
|
112
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/core/check_items_billing#other>`_
|
|
113
|
+
|
|
114
|
+
.. autodata:: ACCESSFLAG_FULL_ACCESS
|
|
115
|
+
|
|
116
|
+
==========
|
|
117
|
+
Data Flags
|
|
118
|
+
==========
|
|
119
|
+
|
|
120
|
+
------------
|
|
121
|
+
Retranslator
|
|
122
|
+
------------
|
|
123
|
+
|
|
124
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/retranslator>`_
|
|
125
|
+
|
|
126
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_BASE
|
|
127
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_CUSTOM_PROPERTIES
|
|
128
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_BILLING_PROPERTIES
|
|
129
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_GUID
|
|
130
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_ADMIN_FIELDS
|
|
131
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_CONFIGURATION
|
|
132
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_UNITS
|
|
133
|
+
.. autodata:: DATAFLAG_RETRANSLATOR_ALL
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
-----------------
|
|
137
|
+
Resource/Accounts
|
|
138
|
+
-----------------
|
|
139
|
+
|
|
140
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/resource>`_
|
|
141
|
+
|
|
142
|
+
.. autodata:: DATAFLAG_RESOURCE_BASE
|
|
143
|
+
.. autodata:: DATAFLAG_RESOURCE_CUSTOM_PROPERTIES
|
|
144
|
+
.. autodata:: DATAFLAG_RESOURCE_BILLING_PROPERTIES
|
|
145
|
+
.. autodata:: DATAFLAG_RESOURCE_CUSTOM_FIELDS
|
|
146
|
+
.. autodata:: DATAFLAG_RESOURCE_MESSAGES
|
|
147
|
+
.. autodata:: DATAFLAG_RESOURCE_GUID
|
|
148
|
+
.. autodata:: DATAFLAG_RESOURCE_ADMIN_FIELDS
|
|
149
|
+
.. autodata:: DATAFLAG_RESOURCE_DRIVERS
|
|
150
|
+
.. autodata:: DATAFLAG_RESOURCE_JOBS
|
|
151
|
+
.. autodata:: DATAFLAG_RESOURCE_NOTIFICATIONS
|
|
152
|
+
.. autodata:: DATAFLAG_RESOURCE_POIS
|
|
153
|
+
.. autodata:: DATAFLAG_RESOURCE_GEOFENCES
|
|
154
|
+
.. autodata:: DATAFLAG_RESOURCE_REPORT_TEMPLATES
|
|
155
|
+
.. autodata:: DATAFLAG_RESOURCE_DRIVER_ATTACHABLE_UNITS
|
|
156
|
+
.. autodata:: DATAFLAG_RESOURCE_DRIVER_GROUPS
|
|
157
|
+
.. autodata:: DATAFLAG_RESOURCE_TRAILERS
|
|
158
|
+
.. autodata:: DATAFLAG_RESOURCE_TRAILER_GROUPS
|
|
159
|
+
.. autodata:: DATAFLAG_RESOURCE_TRAILER_ATTACHABLE_UNITS
|
|
160
|
+
.. autodata:: DATAFLAG_RESOURCE_ORDERS
|
|
161
|
+
.. autodata:: DATAFLAG_RESOURCE_GEOFENCE_GROUPS
|
|
162
|
+
.. autodata:: DATAFLAG_RESOURCE_TAGS
|
|
163
|
+
.. autodata:: DATAFLAG_RESOURCE_TAG_ATTACHABLE_UNITS
|
|
164
|
+
.. autodata:: DATAFLAG_RESOURCE_TAG_GROUPS
|
|
165
|
+
.. autodata:: DATAFLAG_RESOURCE_ALL
|
|
166
|
+
|
|
167
|
+
-----
|
|
168
|
+
Route
|
|
169
|
+
-----
|
|
170
|
+
|
|
171
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/route>`_
|
|
172
|
+
|
|
173
|
+
.. autodata:: DATAFLAG_ROUTE_BASE
|
|
174
|
+
.. autodata:: DATAFLAG_ROUTE_CUSTOM_PROPERTIES
|
|
175
|
+
.. autodata:: DATAFLAG_ROUTE_BILLING_PROPERTIES
|
|
176
|
+
.. autodata:: DATAFLAG_ROUTE_GUID
|
|
177
|
+
.. autodata:: DATAFLAG_ROUTE_ADMIN_FIELDS
|
|
178
|
+
.. autodata:: DATAFLAG_ROUTE_CONFIGURATION
|
|
179
|
+
.. autodata:: DATAFLAG_ROUTE_CHECKPOINTS
|
|
180
|
+
.. autodata:: DATAFLAG_ROUTE_SCHEDULES
|
|
181
|
+
.. autodata:: DATAFLAG_ROUTE_ROUNDS
|
|
182
|
+
.. autodata:: DATAFLAG_ROUTE_ALL
|
|
183
|
+
|
|
184
|
+
----
|
|
185
|
+
Unit
|
|
186
|
+
----
|
|
187
|
+
|
|
188
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/unit>`_
|
|
189
|
+
|
|
190
|
+
.. autodata:: DATAFLAG_UNIT_BASE
|
|
191
|
+
.. autodata:: DATAFLAG_UNIT_CUSTOM_PROPERTIES
|
|
192
|
+
.. autodata:: DATAFLAG_UNIT_BILLING_PROPERTIES
|
|
193
|
+
.. autodata:: DATAFLAG_UNIT_CUSTOM_FIELDS
|
|
194
|
+
.. autodata:: DATAFLAG_UNIT_IMAGE
|
|
195
|
+
.. autodata:: DATAFLAG_UNIT_MESSAGES
|
|
196
|
+
.. autodata:: DATAFLAG_UNIT_GUID
|
|
197
|
+
.. autodata:: DATAFLAG_UNIT_ADMIN_FIELDS
|
|
198
|
+
.. autodata:: DATAFLAG_UNIT_ADVANCED_PROPERTIES
|
|
199
|
+
.. autodata:: DATAFLAG_UNIT_CURRENT_MOMENT_COMMANDS
|
|
200
|
+
.. autodata:: DATAFLAG_UNIT_LAST_MESSAGE
|
|
201
|
+
.. autodata:: DATAFLAG_UNIT_SENSORS
|
|
202
|
+
.. autodata:: DATAFLAG_UNIT_COUNTERS
|
|
203
|
+
.. autodata:: DATAFLAG_UNIT_MAINTENANCE
|
|
204
|
+
.. autodata:: DATAFLAG_UNIT_REPORT_CONFIGURATION
|
|
205
|
+
.. autodata:: DATAFLAG_UNIT_AVAILABLE_COMMANDS
|
|
206
|
+
.. autodata:: DATAFLAG_UNIT_MESSAGE_PARAMETERS
|
|
207
|
+
.. autodata:: DATAFLAG_UNIT_CONNECTION_STATUS
|
|
208
|
+
.. autodata:: DATAFLAG_UNIT_POSITION
|
|
209
|
+
.. autodata:: DATAFLAG_UNIT_PROFILE_FIELDS
|
|
210
|
+
.. autodata:: DATAFLAG_UNIT_ALL
|
|
211
|
+
|
|
212
|
+
----------
|
|
213
|
+
Unit Group
|
|
214
|
+
----------
|
|
215
|
+
|
|
216
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/group>`_
|
|
217
|
+
|
|
218
|
+
.. autodata:: DATAFLAG_GROUP_BASE
|
|
219
|
+
.. autodata:: DATAFLAG_GROUP_CUSTOM_PROPERTIES
|
|
220
|
+
.. autodata:: DATAFLAG_GROUP_BILLING_PROPERTIES
|
|
221
|
+
.. autodata:: DATAFLAG_GROUP_CUSTOM_FIELDS
|
|
222
|
+
.. autodata:: DATAFLAG_GROUP_IMAGE
|
|
223
|
+
.. autodata:: DATAFLAG_GROUP_GUID
|
|
224
|
+
.. autodata:: DATAFLAG_GROUP_ADMIN_FIELDS
|
|
225
|
+
.. autodata:: DATAFLAG_GROUP_ALL
|
|
226
|
+
|
|
227
|
+
----
|
|
228
|
+
User
|
|
229
|
+
----
|
|
230
|
+
|
|
231
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/format/user>`_
|
|
232
|
+
|
|
233
|
+
.. autodata:: DATAFLAG_USER_BASE
|
|
234
|
+
.. autodata:: DATAFLAG_USER_CUSTOM_PROPERTIES
|
|
235
|
+
.. autodata:: DATAFLAG_USER_BILLING_PROPERTIES
|
|
236
|
+
.. autodata:: DATAFLAG_USER_CUSTOM_FIELDS
|
|
237
|
+
.. autodata:: DATAFLAG_USER_MESSAGES
|
|
238
|
+
.. autodata:: DATAFLAG_USER_GUID
|
|
239
|
+
.. autodata:: DATAFLAG_USER_ADMIN_FIELDS
|
|
240
|
+
.. autodata:: DATAFLAG_USER_OTHER_PROPERTIES
|
|
241
|
+
.. autodata:: DATAFLAG_USER_NOTIFICATIONS
|
|
242
|
+
.. autodata:: DATAFLAG_USER_ALL
|
|
243
|
+
|
|
244
|
+
==============
|
|
245
|
+
Settings Flags
|
|
246
|
+
==============
|
|
247
|
+
|
|
248
|
+
`Wialon API Reference <https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/user/update_user_flags>`_
|
|
249
|
+
|
|
250
|
+
----
|
|
251
|
+
User
|
|
252
|
+
----
|
|
253
|
+
|
|
254
|
+
.. autodata:: SETTINGSFLAG_USER_DISABLED
|
|
255
|
+
.. autodata:: SETTINGSFLAG_USER_CANNOT_CHANGE_PASSWORD
|
|
256
|
+
.. autodata:: SETTINGSFLAG_USER_CAN_CREATE_ITEMS
|
|
257
|
+
.. autodata:: SETTINGSFLAG_USER_CANNOT_CHANGE_SETTINGS
|
|
258
|
+
.. autodata:: SETTINGSFLAG_USER_CAN_SEND_SMS
|
|
259
|
+
|
|
260
|
+
===========
|
|
261
|
+
Token Flags
|
|
262
|
+
===========
|
|
263
|
+
|
|
264
|
+
-------
|
|
265
|
+
General
|
|
266
|
+
-------
|
|
267
|
+
|
|
268
|
+
.. autodata:: TOKENFLAG_ONLINE_TRACKING
|
|
269
|
+
.. autodata:: TOKENFLAG_VIEW_ACCESS
|
|
270
|
+
.. autodata:: TOKENFLAG_MANAGE_NONSENSITIVE
|
|
271
|
+
.. autodata:: TOKENFLAG_MANAGE_SENSITIVE
|
|
272
|
+
.. autodata:: TOKENFLAG_MANAGE_CRITICAL
|
|
273
|
+
.. autodata:: TOKENFLAG_COMMUNICATION
|
|
274
|
+
.. autodata:: TOKENFLAG_MANAGE_ALL
|
|
@@ -3,13 +3,17 @@ Wialon API
|
|
|
3
3
|
|
|
4
4
|
:py:mod:`terminusgps` offers the :py:mod:`wialon` package; a Python library that makes it simple to operate within the Wialon API.
|
|
5
5
|
|
|
6
|
+
.. attention:: :confval:`WIALON_TOKEN` and :confval:`WIALON_ADMIN_ID` must be set before using this package.
|
|
7
|
+
|
|
6
8
|
.. toctree::
|
|
7
9
|
:maxdepth: 2
|
|
8
10
|
:caption: Contents:
|
|
9
11
|
|
|
10
12
|
constants.rst
|
|
11
13
|
errors.rst
|
|
14
|
+
examples.rst
|
|
12
15
|
flags.rst
|
|
13
16
|
items.rst
|
|
14
17
|
session.rst
|
|
18
|
+
settings.rst
|
|
15
19
|
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,38 @@
|
|
|
1
|
+
Wialon API Sessions
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
.. autoclass:: terminusgps.wialon.session.WialonSession
|
|
5
|
+
:members:
|
|
6
|
+
:class-doc-from: init
|
|
7
|
+
|
|
8
|
+
.. autoclass:: terminusgps.wialon.session.WialonSessionManager
|
|
9
|
+
:members:
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
=====
|
|
13
|
+
Usage
|
|
14
|
+
=====
|
|
15
|
+
|
|
16
|
+
.. code:: python
|
|
17
|
+
|
|
18
|
+
from terminusgps.wialon.session import WialonSession
|
|
19
|
+
|
|
20
|
+
# Create a session and login to it
|
|
21
|
+
session = WialonSession()
|
|
22
|
+
session.login(token="my_secure_token")
|
|
23
|
+
|
|
24
|
+
# Use the logged in session to perform API actions
|
|
25
|
+
session.wialon_api.core_search_item(**{"id": "123", "flags": 1})
|
|
26
|
+
|
|
27
|
+
# Don't forget to logout of the session
|
|
28
|
+
# Sessions are destroyed after 5min of inactivity
|
|
29
|
+
session.logout()
|
|
30
|
+
|
|
31
|
+
# Alternatively, use a context manager
|
|
32
|
+
# The context manager handles logging in and out of the session.
|
|
33
|
+
with WialonSession() as session:
|
|
34
|
+
session.wialon_api.core_search_item(**{"id": "123", "flags": 1})
|
|
35
|
+
|
|
36
|
+
# If you already have a session id, no need to login again
|
|
37
|
+
session = WialonSession(sid="my_valid_session_id")
|
|
38
|
+
session.wialon_api.core_search_item(**{"id": "123", "flags": 1})
|