python-terminusgps 52.0.0__tar.gz → 53.0.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-53.0.0/.github/workflows/python-test.yml +33 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/PKG-INFO +1 -1
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/requirements.txt +1 -1
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/conf.py +1 -1
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/pyproject.toml +1 -1
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/service.py +1 -20
- python_terminusgps-53.0.0/terminusgps/authorizenet/utils.py +13 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/mixins.py +0 -1
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/uv.lock +1 -1
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/.github/workflows/sphinx.yml +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/.gitignore +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/.python-version +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/COPYING +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/README.md +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/dist/.gitignore +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/Makefile +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/make.bat +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/authorizenet/api.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/authorizenet/constants.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/authorizenet/index.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/authorizenet/service.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/index.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/mixins.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/validators.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/constants.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/exceptions.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/index.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/items.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/session.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/usage.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/wialon/utils.rst +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/htmlcov/.gitignore +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/__init__.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/__init__.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/address_profiles.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/customer_profiles.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/payment_profiles.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/subscriptions.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/transactions.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/constants.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/default_settings.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/validators.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/wialon/constants.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/wialon/flags.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/wialon/session.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/wialon/utils.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/tests/__init__.py +0 -0
- {python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/tests/test_authorizenet.py +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: "Python Test CI"
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ "main" ]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ "main" ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
builds:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
persist-credentials: false
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v6
|
|
21
|
+
with:
|
|
22
|
+
version: "0.10.0"
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version-file: ".python-version"
|
|
28
|
+
|
|
29
|
+
- name: Install project
|
|
30
|
+
run: uv sync --locked
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: uv run python -m unittest discover
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version:
|
|
3
|
+
Version: 53.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://terminusgps.github.io/python-terminusgps
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -12,7 +12,7 @@ sys.path.insert(0, os.path.abspath("../../"))
|
|
|
12
12
|
project = "python-terminusgps"
|
|
13
13
|
copyright = "2025, Terminus GPS, LLC"
|
|
14
14
|
author = "Terminus GPS, LLC"
|
|
15
|
-
release = "
|
|
15
|
+
release = "52.0.0"
|
|
16
16
|
|
|
17
17
|
# -- General configuration ---------------------------------------------------
|
|
18
18
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-terminusgps"
|
|
3
|
-
version = "
|
|
3
|
+
version = "53.0.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" } ]
|
|
@@ -3,14 +3,8 @@ from functools import cached_property
|
|
|
3
3
|
from authorizenet.apicontractsv1 import merchantAuthenticationType
|
|
4
4
|
from authorizenet.apicontrollersbase import APIOperationBase
|
|
5
5
|
from django.conf import settings
|
|
6
|
-
from django.core.exceptions import ImproperlyConfigured
|
|
7
6
|
from lxml.objectify import ObjectifiedElement
|
|
8
7
|
|
|
9
|
-
if not settings.configured:
|
|
10
|
-
from terminusgps import default_settings
|
|
11
|
-
|
|
12
|
-
settings.configure(default_settings)
|
|
13
|
-
|
|
14
8
|
|
|
15
9
|
class AuthorizenetControllerExecutionError(Exception):
|
|
16
10
|
"""Raised when an Authorizenet API controller fails to execute."""
|
|
@@ -37,19 +31,6 @@ class AuthorizenetControllerExecutionError(Exception):
|
|
|
37
31
|
class AuthorizenetService:
|
|
38
32
|
"""Service for safely interacting with the Authorizenet API."""
|
|
39
33
|
|
|
40
|
-
REQUIRED_SETTINGS = (
|
|
41
|
-
"MERCHANT_AUTH_ENVIRONMENT",
|
|
42
|
-
"MERCHANT_AUTH_LOGIN_ID",
|
|
43
|
-
"MERCHANT_AUTH_TRANSACTION_KEY",
|
|
44
|
-
"MERCHANT_AUTH_VALIDATION_MODE",
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
def __init__(self) -> None:
|
|
48
|
-
"""Raises :py:exc:`~django.core.exceptions.ImproperlyConfigured` if required settings weren't set."""
|
|
49
|
-
for setting in self.REQUIRED_SETTINGS:
|
|
50
|
-
if not hasattr(settings, setting):
|
|
51
|
-
raise ImproperlyConfigured(f"'{setting}' setting is required.")
|
|
52
|
-
|
|
53
34
|
def execute(
|
|
54
35
|
self,
|
|
55
36
|
request_tuple: tuple[ObjectifiedElement, type[APIOperationBase]],
|
|
@@ -79,7 +60,7 @@ class AuthorizenetService:
|
|
|
79
60
|
controller.execute()
|
|
80
61
|
response = controller.getresponse()
|
|
81
62
|
|
|
82
|
-
if response
|
|
63
|
+
if not response:
|
|
83
64
|
raise AuthorizenetControllerExecutionError(
|
|
84
65
|
message="No response from the Authorizenet API controller.",
|
|
85
66
|
code="1",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
|
|
3
|
+
T_contract = typing.TypeVar("T_contract")
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def build_contract(
|
|
7
|
+
contract_cls: type[T_contract], fields: dict[str, typing.Any]
|
|
8
|
+
) -> T_contract:
|
|
9
|
+
contract = contract_cls()
|
|
10
|
+
for key, value in fields.items():
|
|
11
|
+
if value:
|
|
12
|
+
setattr(contract, key, value)
|
|
13
|
+
return contract
|
|
@@ -21,7 +21,6 @@ class HtmxTemplateResponseMixin(TemplateResponseMixin):
|
|
|
21
21
|
def get_template_names(self) -> list[str]:
|
|
22
22
|
hx_request: bool = bool(self.request.headers.get("HX-Request"))
|
|
23
23
|
hx_boosted: bool = bool(self.request.headers.get("HX-Boosted"))
|
|
24
|
-
|
|
25
24
|
template_names: list[str] = super().get_template_names()
|
|
26
25
|
if hx_request and not hx_boosted:
|
|
27
26
|
template_names.insert(0, self.template_name + self.partial_name)
|
|
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-52.0.0 → python_terminusgps-53.0.0}/docs/source/authorizenet/constants.rst
RENAMED
|
File without changes
|
|
File without changes
|
{python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/docs/source/authorizenet/service.rst
RENAMED
|
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-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/__init__.py
RENAMED
|
File without changes
|
{python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/api/transactions.py
RENAMED
|
File without changes
|
{python_terminusgps-52.0.0 → python_terminusgps-53.0.0}/terminusgps/authorizenet/constants.py
RENAMED
|
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
|