VaultAPI-Client 0.1.1__py3-none-any.whl → 0.1.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.2
2
2
  Name: VaultAPI-Client
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Client application for VaultAPI Server
5
5
  Author-email: Vignesh Rao <svignesh1793@gmail.com>
6
6
  License: MIT License
@@ -0,0 +1,13 @@
1
+ vaultapi/__init__.py,sha256=4Qrvj-J-MKCdBly6xVIxdVV1ueDp30hwqSfiBWjab8I,1507
2
+ vaultapi/aws.py,sha256=FpFDP9jDmiXek_zzgVMQ5FZoqzyh0HIR4vqnry0Ap-U,2722
3
+ vaultapi/config.py,sha256=06PBsWd5RxehK1BvFfDCzm96Dic1RK-qOp9rCRpZC6k,3873
4
+ vaultapi/exceptions.py,sha256=KUTAshsxk7ewcZsjGibGP0076L0QrLzuADRnrv30FK4,90
5
+ vaultapi/main.py,sha256=zcVAPOzKVdB0eDqbxr8GNCNBXfC3L2LSEc2Jh8lim1o,6593
6
+ vaultapi/transit.py,sha256=VaP4bSryulgpMn4tXcGnEUCJ1AAZYzHw4EwYhdIF4XE,2878
7
+ vaultapi/util.py,sha256=REd8SIycx9q6AQoaHG8UfkbWfPHUtSSz7E3ngWRc4WM,262
8
+ VaultAPI_Client-0.1.2.dist-info/LICENSE,sha256=_sOIKJWdD2o1WwwDIwYB2qTP2nlSWqT5Tyg9jr1Xa4w,1070
9
+ VaultAPI_Client-0.1.2.dist-info/METADATA,sha256=3sWt5TXIHhgB0uWooRgHbYVK3YJL8u6e_a0QCSqi3ko,5683
10
+ VaultAPI_Client-0.1.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
11
+ VaultAPI_Client-0.1.2.dist-info/entry_points.txt,sha256=MKe6sVDEAHC3YBZoYWLMvgwupRE_QJ_iHK0umfgGOzs,50
12
+ VaultAPI_Client-0.1.2.dist-info/top_level.txt,sha256=17jtNvOOJqazNgWn2ZTmJqfQau5jan_xF82NAJOINQg,9
13
+ VaultAPI_Client-0.1.2.dist-info/RECORD,,
vaultapi/__init__.py CHANGED
@@ -4,7 +4,7 @@ import json
4
4
  from .exceptions import VaultAPIClientError
5
5
  from .main import LOGGER, VaultAPIClient
6
6
 
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
 
9
9
 
10
10
  def commandline():
vaultapi/aws.py CHANGED
@@ -30,7 +30,7 @@ class AWSClient:
30
30
  self.secret_client = session.client(service_name="secretsmanager")
31
31
  self.ssm_client = session.client(service_name="ssm")
32
32
 
33
- def get_aws_secrets(self, name: str = None) -> str | List[str]:
33
+ def get_aws_secrets(self, name: str = None) -> str | List[str] | None:
34
34
  """Get secrets from AWS secretsmanager.
35
35
 
36
36
  Args:
@@ -42,13 +42,17 @@ class AWSClient:
42
42
  """
43
43
  if name:
44
44
  LOGGER.info("Retrieving the secret '%s' from AWS secrets manager", name)
45
- response = self.secret_client.get_secret_value(SecretId=name)
45
+ try:
46
+ response = self.secret_client.get_secret_value(SecretId=name)
47
+ except Exception as error:
48
+ LOGGER.exception(error)
49
+ return
46
50
  return response["SecretString"]
47
51
  paginator = self.secret_client.get_paginator("list_secrets")
48
52
  page_results = paginator.paginate().build_full_result()
49
53
  return [page["Name"] for page in page_results["SecretList"]]
50
54
 
51
- def get_aws_params(self, name: str = None) -> str | List[str]:
55
+ def get_aws_params(self, name: str = None) -> str | List[str] | None:
52
56
  """Get SSM parameters from AWS.
53
57
 
54
58
  Args:
@@ -60,7 +64,11 @@ class AWSClient:
60
64
  """
61
65
  if name:
62
66
  LOGGER.info("Retrieving the parameter '%s' from AWS parameter store", name)
63
- response = self.ssm_client.get_parameter(Name=name, WithDecryption=True)
67
+ try:
68
+ response = self.ssm_client.get_parameter(Name=name, WithDecryption=True)
69
+ except Exception as error:
70
+ LOGGER.exception(error)
71
+ return
64
72
  return response["Parameter"]["Value"]
65
73
  paginator = self.ssm_client.get_paginator("describe_parameters")
66
74
  page_results = paginator.paginate().build_full_result()
@@ -1,13 +0,0 @@
1
- vaultapi/__init__.py,sha256=WNCzu9b7gC742ul00xPob1JeatpxYAX4HWTPkUuboBI,1507
2
- vaultapi/aws.py,sha256=ixP9xNzBaboszpBfT4dvxq2C8SbDQU-F4tRoYXGJnMQ,2462
3
- vaultapi/config.py,sha256=06PBsWd5RxehK1BvFfDCzm96Dic1RK-qOp9rCRpZC6k,3873
4
- vaultapi/exceptions.py,sha256=KUTAshsxk7ewcZsjGibGP0076L0QrLzuADRnrv30FK4,90
5
- vaultapi/main.py,sha256=zcVAPOzKVdB0eDqbxr8GNCNBXfC3L2LSEc2Jh8lim1o,6593
6
- vaultapi/transit.py,sha256=VaP4bSryulgpMn4tXcGnEUCJ1AAZYzHw4EwYhdIF4XE,2878
7
- vaultapi/util.py,sha256=REd8SIycx9q6AQoaHG8UfkbWfPHUtSSz7E3ngWRc4WM,262
8
- VaultAPI_Client-0.1.1.dist-info/LICENSE,sha256=_sOIKJWdD2o1WwwDIwYB2qTP2nlSWqT5Tyg9jr1Xa4w,1070
9
- VaultAPI_Client-0.1.1.dist-info/METADATA,sha256=DCFF_gGdq8ALy9nQHX6vMF7qkD9mPWc8NcAZvTDmkkE,5683
10
- VaultAPI_Client-0.1.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
11
- VaultAPI_Client-0.1.1.dist-info/entry_points.txt,sha256=MKe6sVDEAHC3YBZoYWLMvgwupRE_QJ_iHK0umfgGOzs,50
12
- VaultAPI_Client-0.1.1.dist-info/top_level.txt,sha256=17jtNvOOJqazNgWn2ZTmJqfQau5jan_xF82NAJOINQg,9
13
- VaultAPI_Client-0.1.1.dist-info/RECORD,,