KeyisBClient-mmbp 0.0.0.1.9__py3-none-any.whl → 0.0.0.1.11__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.
@@ -5,20 +5,39 @@
5
5
 
6
6
 
7
7
  import os
8
+ import sys
8
9
  import httpx
9
10
  from KeyisBLogging import logging
10
11
  from KeyisBClient import Exceptions
11
12
  from KeyisBClient.models import Request, Response
12
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('gw_certs')
24
+ ]
25
+
26
+ for path in paths:
27
+ ssl_gw_crt_path = path + '\\v0.0.1.crt'
28
+ print(f'SSL certificate for GW at: {ssl_gw_crt_path} [{os.path.exists(ssl_gw_crt_path)}]')
29
+ if os.path.exists(ssl_gw_crt_path):
30
+ break
31
+
13
32
  class Client:
14
33
  def __init__(self):
15
34
  self.protocols = {
16
35
  'mmbp': {'versions': ['0.0.0.0.1']},
17
36
  'mmbps': {'versions': ['0.0.0.0.1']}
18
37
  }
19
- crt_path = os.path.join(os.path.dirname(__file__), 'gw_certs', 'v0.0.1.crt')
20
- self.__httpAsyncClient = httpx.AsyncClient(verify=crt_path, follow_redirects=True)
21
- self.__httpClient = httpx.Client(verify=crt_path, follow_redirects=True)
38
+
39
+ self.__httpAsyncClient = httpx.AsyncClient(verify=ssl_gw_crt_path, follow_redirects=True)
40
+ self.__httpClient = httpx.Client(verify=ssl_gw_crt_path, follow_redirects=True)
22
41
 
23
42
 
24
43
  async def requestAsync(self, request: Request) -> Response:
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KeyisBClient_mmbp
3
- Version: 0.0.0.1.9
3
+ Version: 0.0.0.1.11
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=m06A03lLKdy6zjBdGpNO2HxaO3CMCn3Wb7NWPzmxIdU,5953
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.11.dist-info/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
6
+ KeyisBClient_mmbp-0.0.0.1.11.dist-info/METADATA,sha256=SK378nWN8pljgGWHj_4vMvhPCL5IecRoE-EmtmxukcE,513
7
+ KeyisBClient_mmbp-0.0.0.1.11.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
8
+ KeyisBClient_mmbp-0.0.0.1.11.dist-info/top_level.txt,sha256=h6s4YlLhQ13xiqaDqhXJamhuez9D23BmPTwQvMr54FA,18
9
+ KeyisBClient_mmbp-0.0.0.1.11.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,8 +0,0 @@
1
- KeyisBClient_mmbp/Client.py,sha256=_RaG6lwSX_OEYOXDxPo809DCFSUzgdh3HNLZ3nJHQHU,5453
2
- KeyisBClient_mmbp/__init__.py,sha256=y8gLgE6Z2VvJFPnXGVeO7P_OYRoRZufvurQrR5RG1jg,1562
3
- KeyisBClient_mmbp/gw_certs/v0.0.1.crt,sha256=4SZKPldOi2FXuOl1Lv9JgjojA8-RL2dzn_mh4XVeuZs,1342
4
- KeyisBClient_mmbp-0.0.0.1.9.dist-info/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
5
- KeyisBClient_mmbp-0.0.0.1.9.dist-info/METADATA,sha256=a_QUcU9-40kY9RhPWtyBgfsq3aHoZQt6qUEPyVHejzM,512
6
- KeyisBClient_mmbp-0.0.0.1.9.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
7
- KeyisBClient_mmbp-0.0.0.1.9.dist-info/top_level.txt,sha256=h6s4YlLhQ13xiqaDqhXJamhuez9D23BmPTwQvMr54FA,18
8
- KeyisBClient_mmbp-0.0.0.1.9.dist-info/RECORD,,