naeural-client 2.6.17__py3-none-any.whl → 2.6.19__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.
naeural_client/_ver.py CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "2.6.17"
1
+ __VER__ = "2.6.19"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
naeural_client/bc/base.py CHANGED
@@ -375,8 +375,8 @@ class BaseBlockEngine:
375
375
  password=self.__password,
376
376
  fn=self.__pem_file,
377
377
  )
378
-
379
- os.environ[BCct.K_USER_CONFIG_PEM_FILE] = self.__pem_file
378
+
379
+ os.environ[BCct.K_USER_CONFIG_PEM_FILE] = os.path.abspath(self.__pem_file)
380
380
 
381
381
  self.__public_key = self._get_pk(private_key=self.__private_key)
382
382
  self.__address = self._pk_to_address(self.__public_key)
@@ -6,6 +6,7 @@ import pickle
6
6
  import hashlib
7
7
  import numpy as np
8
8
  import traceback
9
+ import random
9
10
  from queue import Queue
10
11
 
11
12
  from collections import OrderedDict, deque, defaultdict
@@ -13,6 +14,44 @@ from collections import OrderedDict, deque, defaultdict
13
14
  from io import BytesIO, TextIOWrapper
14
15
 
15
16
 
17
+ adjectives = [
18
+ 'able', 'arco', 'arty', 'awed', 'awny', 'bald', 'base', 'bass', 'bent', 'best', 'boxy',
19
+ 'buff', 'cold', 'curt', 'cyan', 'deep', 'done', 'dopy', 'dour', 'down', 'dozy', 'drab',
20
+ 'dual', 'east', 'easy', 'eery', 'fain', 'fast', 'faux', 'fine', 'firm', 'flat', 'flip',
21
+ 'fond', 'free', 'full', 'glad', 'gone', 'good', 'grim', 'hard', 'hazy', 'hewn', 'hick',
22
+ 'high', 'hoar', 'holy', 'iffy', 'iron', 'jain', 'just', 'keen', 'kept', 'lame', 'last',
23
+ 'late', 'less', 'long', 'lost', 'many', 'meek', 'mild', 'mini', 'moot', 'more', 'most',
24
+ 'mown', 'much', 'near', 'next', 'nine', 'only', 'open', 'oval', 'paid', 'past', 'port',
25
+ 'posh', 'rash', 'real', 'ropy', 'rose', 'rosy', 'ruby', 'rude', 'ruly', 'rush', 'rust',
26
+ 'safe', 'sage', 'said', 'salt', 'same', 'sane', 'sent', 'sere', 'shod', 'shut', 'skew',
27
+ 'sold', 'sole', 'solo', 'some', 'sore', 'sour', 'sown', 'spic', 'spry', 'star', 'such',
28
+ 'surd', 'sure', 'tame', 'tart', 'teal', 'thai', 'tied', 'trig', 'true', 'vain', 'vast',
29
+ 'very', 'void', 'wary', 'waxy', 'well', 'west', 'wide', 'wild', 'wily', 'winy', 'wiry',
30
+ 'wise', 'worn', 'zero'
31
+ ]
32
+
33
+ nouns = [
34
+ 'area', 'aria', 'army', 'arts', 'arui', 'baas', 'baby', 'back', 'band', 'bars', 'bash',
35
+ 'bead', 'beam', 'beck', 'bill', 'boat', 'bock', 'body', 'bore', 'bota', 'boys', 'brig',
36
+ 'bris', 'buff', 'call', 'carl', 'carp', 'cars', 'case', 'cert', 'punk', 'chat', 'chew',
37
+ 'city', 'club', 'code', 'cold', 'cook', 'corn', 'dada', 'days', 'dean', 'demo', 'desk',
38
+ 'doge', 'doll', 'door', 'drib', 'duct', 'dupe', 'dust', 'duty', 'ears', 'edge', 'eyes',
39
+ 'face', 'fact', 'feed', 'feet', 'file', 'flow', 'food', 'full', 'fund', 'funk', 'gain',
40
+ 'gary', 'gate', 'giro', 'goal', 'hair', 'hale', 'hall', 'hals', 'hand', 'hang', 'head',
41
+ 'heat', 'help', 'hero', 'high', 'hill', 'hole', 'home', 'hope', 'hour', 'howe', 'iron',
42
+ 'item', 'jews', 'jobs', 'john', 'july', 'jury', 'kate', 'kean', 'kerb', 'kino', 'kota',
43
+ 'lace', 'lady', 'lake', 'land', 'left', 'life', 'limo', 'line', 'lips', 'lisp', 'look',
44
+ 'lots', 'maja', 'marc', 'mass', 'mile', 'mind', 'mold', 'mood', 'moon', 'name', 'nard',
45
+ 'nest', 'nose', 'ohio', 'ones', 'opec', 'opus', 'page', 'papa', 'part', 'pass', 'past',
46
+ 'paul', 'peel', 'peso', 'pike', 'pitt', 'port', 'pull', 'quat', 'rain', 'real', 'rest',
47
+ 'rhus', 'ring', 'rise', 'rock', 'roof', 'room', 'rule', 'runs', 'sack', 'safe', 'sake',
48
+ 'sars', 'seat', 'seed', 'sets', 'ship', 'shop', 'shot', 'sian', 'side', 'sign', 'silt',
49
+ 'site', 'size', 'solo', 'spot', 'step', 'talk', 'tape', 'task', 'thor', 'tied', 'time',
50
+ 'tone', 'tool', 'tour', 'tree', 'ulex', 'vela', 'vice', 'wage', 'wall', 'week', 'weld',
51
+ 'word', 'work', 'wyat', 'year', 'york'
52
+ ]
53
+
54
+
16
55
  class _UtilsMixin(object):
17
56
  """
18
57
  Mixin for functionalities that do not belong to any mixin that are attached to `naeural_client.Logger`.
@@ -633,7 +672,16 @@ class _UtilsMixin(object):
633
672
  str_id = str(uuid4())
634
673
  str_id = str_id.replace('-','')
635
674
  return str_id[:size]
636
-
675
+
676
+ @staticmethod
677
+ def get_random_name(size=2):
678
+ """
679
+ Generates a random name using adjectives and nouns
680
+ """
681
+ adj = random.choice(adjectives)
682
+ noun = random.choice(nouns)
683
+ uuid = _UtilsMixin.get_uid(size=size)
684
+ return f"{adj}-{noun}-{uuid}"
637
685
 
638
686
 
639
687
  @staticmethod
@@ -673,3 +721,6 @@ class _UtilsMixin(object):
673
721
  return _UtilsMixin.name_abbreviation(s)
674
722
 
675
723
 
724
+ if __name__ == '__main__':
725
+ for _ in range(10):
726
+ print(_UtilsMixin.get_random_name())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naeural_client
3
- Version: 2.6.17
3
+ Version: 2.6.19
4
4
  Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol Edge Protocol framework
5
5
  Project-URL: Homepage, https://github.com/NaeuralEdgeProtocol/naeural_client
6
6
  Project-URL: Bug Tracker, https://github.com/NaeuralEdgeProtocol/naeural_client/issues
@@ -1,5 +1,5 @@
1
1
  naeural_client/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- naeural_client/_ver.py,sha256=a13tDJz2h38R-dMX3tSu3GXNgWR_bQn7arhcl-Tfbig,331
2
+ naeural_client/_ver.py,sha256=cGbg4lzicQCeWoKmbE20ZeTVlU_T_UqN2Y4DFRQ9PeI,331
3
3
  naeural_client/base_decentra_object.py,sha256=C4iwZTkhKNBS4VHlJs5DfElRYLo4Q9l1V1DNVSk1fyQ,4412
4
4
  naeural_client/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
5
5
  naeural_client/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
@@ -14,7 +14,7 @@ naeural_client/base/webapp_pipeline.py,sha256=QmPLVmhP0CPdi0YuvbZEH4APYz2Amtw3gy
14
14
  naeural_client/base/payload/__init__.py,sha256=y8fBI8tG2ObNfaXFWjyWZXwu878FRYj_I8GIbHT4GKE,29
15
15
  naeural_client/base/payload/payload.py,sha256=x-au7l67Z_vfn_4R2C_pjZCaFuUVXHngJiGOfIAYVdE,2690
16
16
  naeural_client/bc/__init__.py,sha256=FQj23D1PrY06NUOARiKQi4cdj0-VxnoYgYDEht8lpr8,158
17
- naeural_client/bc/base.py,sha256=KC-wtymP9tEvXGG6wfiRirgshjW7_y58ylWjbe_lUWo,36160
17
+ naeural_client/bc/base.py,sha256=hiKibexlNpZWYfFjKH-Jdwe79p4rM6j4e0M3AYPZCNs,36169
18
18
  naeural_client/bc/chain.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  naeural_client/bc/ec.py,sha256=qI8l7YqiS4MNftlx-tF7IZUswrSeQc7KMn5OZ0fEaJs,23370
20
20
  naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -71,7 +71,7 @@ naeural_client/logging/logger_mixins/process_mixin.py,sha256=ZO7S1mvKWwH_UIqv7JG
71
71
  naeural_client/logging/logger_mixins/resource_size_mixin.py,sha256=EdCeFM8Ol8q_OTOmsj5Q2uKPvkqkoNdcXSZjw4FgAh4,2297
72
72
  naeural_client/logging/logger_mixins/timers_mixin.py,sha256=6D1HlLB97TpIwJEqj4UPBf1Md2HVORlSWtwXqnKyab4,17315
73
73
  naeural_client/logging/logger_mixins/upload_mixin.py,sha256=mvooNlNDNa_9D906d5qkfzTcvvsAuBOResoGCZ5IFnE,7697
74
- naeural_client/logging/logger_mixins/utils_mixin.py,sha256=EsqA2piBW3wLL-2BDagCqVMLAUkTVAH_HP6Z4kiQc6E,19557
74
+ naeural_client/logging/logger_mixins/utils_mixin.py,sha256=G07keY2KhMQB094MIuw4ao6-_NCvoKyomp0j-tASOk0,22658
75
75
  naeural_client/logging/tzlocal/__init__.py,sha256=PBLaZSFatmJp2fX4Bwalwc5LgWX9Vcw-FWHnBvW1k8E,384
76
76
  naeural_client/logging/tzlocal/unix.py,sha256=Cgpzg1jxrcSivyT5xFRX69W5XkF5ollvXPr976RIbmA,7268
77
77
  naeural_client/logging/tzlocal/utils.py,sha256=6F2QE3b8xiKwBriQaT0jrgBeyrKhCj6b-eSCEywLSMg,3094
@@ -81,8 +81,8 @@ naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uw
81
81
  naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
82
82
  naeural_client/utils/config.py,sha256=v7xHikr6Z5Sbvf3opYeMhYzGWD2pe0HlRwa-aGJzUh8,6323
83
83
  naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
84
- naeural_client-2.6.17.dist-info/METADATA,sha256=QmW52DiXhkO0AzSeVwB_9Goeb_y7Aex51LkUZ2UKFa0,10362
85
- naeural_client-2.6.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
- naeural_client-2.6.17.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
87
- naeural_client-2.6.17.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
88
- naeural_client-2.6.17.dist-info/RECORD,,
84
+ naeural_client-2.6.19.dist-info/METADATA,sha256=libLr6n_liai4bqq9Fd1406S0pE3amdiSDgYEigzrFY,10362
85
+ naeural_client-2.6.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
+ naeural_client-2.6.19.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
87
+ naeural_client-2.6.19.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
88
+ naeural_client-2.6.19.dist-info/RECORD,,