python-terminusgps 37.7.1__py3-none-any.whl → 37.7.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 37.7.1
3
+ Version: 37.7.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://docs.terminusgps.com
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -3,7 +3,7 @@ terminusgps/authorizenet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
3
3
  terminusgps/authorizenet/auth.py,sha256=CKT_pfDEL-53GceOEaFtIU6IBXVuVd8MVHikpPAX0xY,1184
4
4
  terminusgps/authorizenet/constants.py,sha256=uXkYVmQPrnYBDfGahVEmzwTny21A8jGcrH7qfSdLhvc,512
5
5
  terminusgps/authorizenet/controllers.py,sha256=rMuBwSoKJjte7wVuB1ewaqnzfuDXxwus-d5mkqbfnGE,2193
6
- terminusgps/authorizenet/utils.py,sha256=B8BEqPHpMLAIYTqDPArnz6zsAQuEwbTPsmkqO4EAZR0,7489
6
+ terminusgps/authorizenet/utils.py,sha256=LosPGnOam97Fk51aoCAIdoyrQRdxV43mXxpZ1TsmPDQ,7042
7
7
  terminusgps/authorizenet/validators.py,sha256=Z4JfKMHhMIH9elsmzW-6KHi9TwOlNp3h_uvtRPCX0GI,3822
8
8
  terminusgps/authorizenet/profiles/__init__.py,sha256=IG4XCEEYtHKqXOatlZlob6J3ukAgF7cFR-RXxOSMS1c,161
9
9
  terminusgps/authorizenet/profiles/addresses.py,sha256=MwJQzq3IrjYCLJzOglLfJIcMvH5osDu1MzN6_XGO0Tc,6376
@@ -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=-9gNTaagJbWpeqTNXdxXsMVKUF2_mwzx5XvqTOFcqYU,670
20
+ terminusgps/aws/secrets.py,sha256=JmRJYg3gj3yXgANtUSRNamzg5dBrQvRmR5P-AWJRqD8,784
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
@@ -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.1.dist-info/METADATA,sha256=UHTXkDy8hfC9-9uhzwrdVkWQTqotoBq9uB5Muj4ZBiM,1329
55
- python_terminusgps-37.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
- python_terminusgps-37.7.1.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
57
- python_terminusgps-37.7.1.dist-info/RECORD,,
54
+ python_terminusgps-37.7.2.dist-info/METADATA,sha256=t3YipxIRVLzWVI_-yeEixF-I4nTH2ewwcQiRBF4Db9k,1329
55
+ python_terminusgps-37.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
+ python_terminusgps-37.7.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
57
+ python_terminusgps-37.7.2.dist-info/RECORD,,
@@ -28,21 +28,6 @@ def calculate_amount_plus_tax(
28
28
  return round(amount * (1 + tax_rate), ndigits=2)
29
29
 
30
30
 
31
- def get_days_between(start_date: datetime.date, end_date: datetime.date) -> int:
32
- """
33
- Returns the total number of days between two dates.
34
-
35
- :param start_date: Start date.
36
- :type start_date: :py:obj:`~datetime.date`
37
- :param end_date: End date.
38
- :type end_date: :py:obj:`~datetime.date`
39
- :returns: The number of days between the dates as an integer.
40
- :rtype: :py:obj:`int`
41
-
42
- """
43
- return (end_date - start_date).days
44
-
45
-
46
31
  def get_merchant_details() -> dict | None:
47
32
  """
48
33
  Returns Authorizenet merchant details.
@@ -5,16 +5,20 @@ import boto3
5
5
 
6
6
  def get_secret(name: str, region: str = "us-east-1") -> dict[str, str]:
7
7
  """
8
- Logs into the default AWS CLI session and returns a secret value.
8
+ Returns a secret value by name from AWS `secretsmanager`_.
9
9
 
10
- :param name: An AWS `secretsmanager <https://docs.aws.amazon.com/secretsmanager/>`_ name.
10
+ :param name: An AWS `secretsmanager`_ name.
11
11
  :type name: :py:obj:`str`
12
12
  :param region: An AWS region name. Default is :py:obj:`"us-east-1"`.
13
13
  :type region: :py:obj:`str`
14
14
  :returns: A secret value dictionary.
15
- :rtype: :py:obj:`dict`
15
+ :rtype: :py:obj:`dict`\[:py:obj:`str`, :py:obj:`str`\]
16
+
17
+
18
+ .. _secretsmanager: https://docs.aws.amazon.com/secretsmanager/
16
19
 
17
20
  """
18
- client = boto3.Session().client(service_name="secretsmanager", region_name=region)
19
- secret = client.get_secret_value(SecretId=name)["SecretString"]
21
+ session = boto3.Session(profile_name="terminusgps-site-role")
22
+ client = session.client(service_name="secretsmanager", region_name=region)
23
+ secret = client.get_secret_value(**{"SecretId": name})["SecretString"]
20
24
  return json.loads(secret)