KeyisBClient-mmbp 0.0.0.1.10__py3-none-any.whl → 0.0.0.1.12__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.
@@ -11,22 +11,34 @@ from KeyisBLogging import logging
11
11
  from KeyisBClient import Exceptions
12
12
  from KeyisBClient.models import Request, Response
13
13
 
14
+ def resource_path(relative_path):
15
+ if getattr(sys, 'frozen', False):
16
+ base_path = sys._MEIPASS # type: ignore
17
+ else:
18
+ base_path = os.path.abspath(os.path.dirname(__file__))
19
+ return os.path.join(base_path, relative_path)
20
+
21
+ paths = [
22
+ "C:\\GW\\certificates\\ssl",
23
+ resource_path('KeyisBClient\\gw_certs'),
24
+ resource_path('gw_certs')
25
+ ]
26
+
27
+ for path in paths:
28
+ ssl_gw_crt_path = path + '\\v0.0.1.crt'
29
+ print(f'SSL certificate for GW at: {ssl_gw_crt_path} [{os.path.exists(ssl_gw_crt_path)}]')
30
+ if os.path.exists(ssl_gw_crt_path):
31
+ break
32
+
14
33
  class Client:
15
34
  def __init__(self):
16
35
  self.protocols = {
17
36
  'mmbp': {'versions': ['0.0.0.0.1']},
18
37
  'mmbps': {'versions': ['0.0.0.0.1']}
19
38
  }
20
- def resource_path(relative_path):
21
- if getattr(sys, 'frozen', False):
22
- base_path = sys._MEIPASS # type: ignore
23
- else:
24
- base_path = os.path.abspath(os.path.dirname(__file__))
25
- return os.path.join(base_path, relative_path)
26
-
27
- crt_path = resource_path(os.path.join('gw_certs', 'v0.0.1.crt'))
28
- self.__httpAsyncClient = httpx.AsyncClient(verify=crt_path, follow_redirects=True)
29
- self.__httpClient = httpx.Client(verify=crt_path, follow_redirects=True)
39
+
40
+ self.__httpAsyncClient = httpx.AsyncClient(verify=ssl_gw_crt_path, follow_redirects=True)
41
+ self.__httpClient = httpx.Client(verify=ssl_gw_crt_path, follow_redirects=True)
30
42
 
31
43
 
32
44
  async def requestAsync(self, request: Request) -> Response:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KeyisBClient_mmbp
3
- Version: 0.0.0.1.10
3
+ Version: 0.0.0.1.12
4
4
  Summary: KeyisBClient_mmbp
5
5
  Home-page: https://github.com/KeyisB/libs/tree/main/KeyisBClient_mmbp
6
6
  Author: KeyisB
@@ -0,0 +1,9 @@
1
+ KeyisBClient_mmbp/Client.py,sha256=4fQHDYtYIz8hporXNkAG8547EC3MlBy_0GkqJsiWyo4,5999
2
+ KeyisBClient_mmbp/__init__.py,sha256=y8gLgE6Z2VvJFPnXGVeO7P_OYRoRZufvurQrR5RG1jg,1562
3
+ KeyisBClient_mmbp/gw_certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ KeyisBClient_mmbp/gw_certs/v0.0.1.crt,sha256=4SZKPldOi2FXuOl1Lv9JgjojA8-RL2dzn_mh4XVeuZs,1342
5
+ KeyisBClient_mmbp-0.0.0.1.12.dist-info/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
6
+ KeyisBClient_mmbp-0.0.0.1.12.dist-info/METADATA,sha256=NLMTldz5er-T7h6da_-hligRk6Yr2cJnlGCTWeutSpw,513
7
+ KeyisBClient_mmbp-0.0.0.1.12.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
8
+ KeyisBClient_mmbp-0.0.0.1.12.dist-info/top_level.txt,sha256=h6s4YlLhQ13xiqaDqhXJamhuez9D23BmPTwQvMr54FA,18
9
+ KeyisBClient_mmbp-0.0.0.1.12.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +0,0 @@
1
- KeyisBClient_mmbp/Client.py,sha256=1WGybmBW57iyQ58yYuvbYliCs6ArFjj8Wc1fP2G_3Vg,5752
2
- KeyisBClient_mmbp/__init__.py,sha256=y8gLgE6Z2VvJFPnXGVeO7P_OYRoRZufvurQrR5RG1jg,1562
3
- KeyisBClient_mmbp/gw_certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- KeyisBClient_mmbp/gw_certs/v0.0.1.crt,sha256=4SZKPldOi2FXuOl1Lv9JgjojA8-RL2dzn_mh4XVeuZs,1342
5
- KeyisBClient_mmbp-0.0.0.1.10.dist-info/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
6
- KeyisBClient_mmbp-0.0.0.1.10.dist-info/METADATA,sha256=gE5StcJ3kqs53OAOpPzzn1fa-z9D2wxt2Kvv_nodRBQ,513
7
- KeyisBClient_mmbp-0.0.0.1.10.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
8
- KeyisBClient_mmbp-0.0.0.1.10.dist-info/top_level.txt,sha256=h6s4YlLhQ13xiqaDqhXJamhuez9D23BmPTwQvMr54FA,18
9
- KeyisBClient_mmbp-0.0.0.1.10.dist-info/RECORD,,