psr-factory 5.0.0b20__py3-none-win_amd64.whl → 5.0.0b21__py3-none-win_amd64.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.
psr/factory/__init__.py CHANGED
@@ -2,6 +2,6 @@
2
2
  # Unauthorized copying of this file, via any medium is strictly prohibited
3
3
  # Proprietary and confidential
4
4
 
5
- __version__ = "5.0.0b20"
5
+ __version__ = "5.0.0b21"
6
6
 
7
7
  from .api import *
psr/factory/api.py CHANGED
@@ -140,6 +140,9 @@ def _bytes(value: str) -> int:
140
140
  class FactoryException(Exception):
141
141
  pass
142
142
 
143
+ class FactoryLicenseError(Exception):
144
+ pass
145
+
143
146
 
144
147
  class LogLevel(enum.Enum):
145
148
  NOTSET = 0
@@ -194,6 +197,18 @@ def build_version() -> str:
194
197
  return _version_short()
195
198
 
196
199
 
200
+ def check_license() -> Tuple[bool, str]:
201
+ """Returns True if license is valid and active."""
202
+ _check_loaded()
203
+ error = Error()
204
+ factorylib.lib.psrd_check_license(error.handler())
205
+ valid = error.code == 0
206
+ invalid = error.code == 15
207
+ if not valid and not invalid:
208
+ raise FactoryException("Error checking license: " + error.what)
209
+ return valid, error.what
210
+
211
+
197
212
  def get_log_level() -> LogLevel:
198
213
  """Get log level."""
199
214
  _check_loaded()
psr/factory/factory.dll CHANGED
Binary file
psr/factory/factorylib.py CHANGED
@@ -29,6 +29,8 @@ def initialize():
29
29
  global lib
30
30
  lib = load_lib()
31
31
 
32
+ lib.psrd_check_license.restype = ctypes.c_int
33
+ lib.psrd_check_license.argtypes = [ctypes.c_void_p]
32
34
  lib.psrd_initialize.restype = ctypes.c_int
33
35
  lib.psrd_initialize.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
34
36
  lib.psrd_unload.restype = ctypes.c_int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: psr-factory
3
- Version: 5.0.0b20
3
+ Version: 5.0.0b21
4
4
  Summary: PSR database management module.
5
5
  Author-email: "PSR Inc." <psrfactory@psr-inc.com>
6
6
  License-Expression: MIT
@@ -16,12 +16,12 @@ psr/execqueue/config.py,sha256=3KVwASOgRlymOSPeabotgBdLVB5sPKnPQ9og2q3LQfw,1418
16
16
  psr/execqueue/db.py,sha256=sNr_StNEgZZQCKcyCWiB1WrQJIhE9UvLUxPA2tWiXGs,8498
17
17
  psr/execqueue/server.py,sha256=nW-Hi5zWHgPeLicASKJND7u6rz6eqwC16k91tUUQPxk,15741
18
18
  psr/execqueue/watcher.py,sha256=7dZZm9TiYVF7SdU0c_6Vq2_SZRobxgcspfBMzKFSsjQ,5637
19
- psr/factory/__init__.py,sha256=U3v5EwQqxGPlZKxeketQlCVIyCfDnd-bMLE_4zORZIk,219
20
- psr/factory/api.py,sha256=X2B1ndnZujKg27NKgTbUTKRA1vGETMhRiaK-BhWAoaM,103815
21
- psr/factory/factory.dll,sha256=r4tG6N1ZuMSxrA0dIMN_EEU06ugxhYLPwl7-_sIlf2Y,18301440
19
+ psr/factory/__init__.py,sha256=8piBlYuDWX7cfD4Smn_7jzq2sysPynLfDhgEaRhc_3A,219
20
+ psr/factory/api.py,sha256=a4zqV4LXjK3psylmRKmMd5Ke0Y7tmAG22BgR3xBfcSs,104265
21
+ psr/factory/factory.dll,sha256=4U1WUtVdlmHEa5JzE6_xFfBVc9eCMSBy3yBTUZL6o0c,18301440
22
22
  psr/factory/factory.pmd,sha256=HryDY8T6vAV5r0W4ytKNPiIYcdn4LexrsVZ5qFYBZ-g,250535
23
23
  psr/factory/factory.pmk,sha256=THhHxBKTBchru3fxTCos-pBAPJJnuug8T2dw0xniDfQ,580185
24
- psr/factory/factorylib.py,sha256=rwqu9lucfBhiFECDd5UVuy1K9jIJ54mUfxNPh4JhY4I,28182
24
+ psr/factory/factorylib.py,sha256=o5Irbw6k-yIOJVUtDu2YYqw2x16P2LmCdouImwSssdw,28290
25
25
  psr/factory/libcurl-x64.dll,sha256=6WGBmqX4q_eD8Vc0E2VpCvVrFV3W7TQoaKqSdbhXBu0,5313096
26
26
  psr/factory/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  psr/factory/samples/__init__.py,sha256=xxOch5Fokzjy571a6OHD87FWM17qKgvfcbr8xn-n36I,80
@@ -33,8 +33,8 @@ psr/psrfcommon/tempfile.py,sha256=5S13wa2DCLYTUdwbLm_KMBRnDRJ0WDlu8GO2BmZoNdg,39
33
33
  psr/runner/__init__.py,sha256=kI9HDX-B_LMQJUHHylFHas2rNpWfNNa0pZXoIvX_Alw,230
34
34
  psr/runner/runner.py,sha256=hCVH62HAZK_M9YUiHQgqCkMevN17utegjfRIw49MdvM,27542
35
35
  psr/runner/version.py,sha256=mch2Y8anSXGMn9w72Z78PhSRhOyn55EwaoLAYhY4McE,194
36
- psr_factory-5.0.0b20.dist-info/licenses/LICENSE.txt,sha256=N6mqZK2Ft3iXGHj-by_MHC_dJo9qwn0URjakEPys3H4,1089
37
- psr_factory-5.0.0b20.dist-info/METADATA,sha256=ylKKfSHq12SHTWQbWG4sMMJDVNGs4mNJOEzG_Sr0pzQ,2333
38
- psr_factory-5.0.0b20.dist-info/WHEEL,sha256=ZjXRCNaQ9YSypEK2TE0LRB0sy2OVXSszb4Sx1XjM99k,97
39
- psr_factory-5.0.0b20.dist-info/top_level.txt,sha256=Jb393O96WQk3b5D1gMcrZBLKJJgZpzNjTPoldUi00ck,4
40
- psr_factory-5.0.0b20.dist-info/RECORD,,
36
+ psr_factory-5.0.0b21.dist-info/licenses/LICENSE.txt,sha256=N6mqZK2Ft3iXGHj-by_MHC_dJo9qwn0URjakEPys3H4,1089
37
+ psr_factory-5.0.0b21.dist-info/METADATA,sha256=728tb5owfD70z5HJ5CFCj5f3mHWVZLjtjJnw1USMbEQ,2333
38
+ psr_factory-5.0.0b21.dist-info/WHEEL,sha256=ZjXRCNaQ9YSypEK2TE0LRB0sy2OVXSszb4Sx1XjM99k,97
39
+ psr_factory-5.0.0b21.dist-info/top_level.txt,sha256=Jb393O96WQk3b5D1gMcrZBLKJJgZpzNjTPoldUi00ck,4
40
+ psr_factory-5.0.0b21.dist-info/RECORD,,