ratio1 3.4.114__py3-none-any.whl → 3.4.116__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.
ratio1/_ver.py CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "3.4.114"
1
+ __VER__ = "3.4.116"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
ratio1/ipfs/r1fs.py CHANGED
@@ -919,6 +919,9 @@ class R1FSEngine:
919
919
  >>> print(cid)
920
920
  QmFolder123ABC
921
921
  """
922
+ add_time, remove_time, pin_time = 0.0, 0.0, 0.0
923
+ start_time = time.time()
924
+
922
925
  if secret in ["", None]:
923
926
  secret = self.__DEFAULT_SECRET
924
927
 
@@ -954,7 +957,6 @@ class R1FSEngine:
954
957
  tmp_cipher_path = os.path.join(tempfile.gettempdir(), uuid.uuid4().hex + ".bin")
955
958
 
956
959
  folder_cid = None
957
- start_time = time.time()
958
960
  try:
959
961
  encryptor = Cipher(algorithms.AES(key), modes.GCM(nonce_bytes)).encryptor()
960
962
 
@@ -996,11 +998,16 @@ class R1FSEngine:
996
998
  else:
997
999
  self.P(msg, color='r')
998
1000
  #end try
999
- elapsed_time = time.time() - start_time
1001
+ add_time = time.time() - start_time
1002
+
1003
+ remove_start_time = time.time()
1000
1004
  # Cleanup temp file
1001
1005
  os.remove(tmp_cipher_path)
1006
+ remove_time = time.time() - remove_start_time
1002
1007
 
1003
1008
  if folder_cid is not None:
1009
+ # Now we notify the relay (if any) about the new CID
1010
+ pin_start_time = time.time()
1004
1011
  if self.__ipfs_relay_api is not None:
1005
1012
  # Notifying the Relay about a new CID.
1006
1013
  try:
@@ -1028,10 +1035,14 @@ class R1FSEngine:
1028
1035
  self.__uploaded_files[folder_cid] = file_path
1029
1036
  # now we pin the folder
1030
1037
  res = self.__pin_add(folder_cid)
1031
- if show_logs:
1032
- self.P(f"Added file {file_path} as <{folder_cid}> in {elapsed_time:.1f}s")
1038
+ pin_time = time.time() - pin_start_time
1033
1039
  #end if show_logs
1034
1040
  #end if folder_cid is not None
1041
+ total_time = time.time() - start_time
1042
+ if show_logs:
1043
+ self.P("Added file {} as <{}> in {.2f}s: add_time={.2f}s, remove_time={.2f}s, pin_time={.2f}s".format(
1044
+ file_path, folder_cid, total_time, add_time, remove_time, pin_time
1045
+ ))
1035
1046
  return folder_cid
1036
1047
 
1037
1048
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ratio1
3
- Version: 3.4.114
3
+ Version: 3.4.116
4
4
  Summary: `ratio1` or Ration1 SDK is the Python SDK required for client app development for the Ratio1 ecosystem
5
5
  Project-URL: Homepage, https://github.com/Ratio1/ratio1_sdk
6
6
  Project-URL: Bug Tracker, https://github.com/Ratio1/ratio1_sdk/issues
@@ -1,5 +1,5 @@
1
1
  ratio1/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- ratio1/_ver.py,sha256=UE66Z2B4zyXQ2QOlnafCp34OYwb9DY_ThqnrsjBmD3k,332
2
+ ratio1/_ver.py,sha256=rB9r4vY3DPd_2SkbcpeGPnwmEqpeaagvHH7EaiTpqJQ,332
3
3
  ratio1/base_decentra_object.py,sha256=iXvAAf6wPnGWzeeiRfwLojVoan-m1e_VsyPzjUQuENo,4492
4
4
  ratio1/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
5
5
  ratio1/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
@@ -74,7 +74,7 @@ ratio1/io_formatter/default/aixp1.py,sha256=MX0TeUR4APA-qN3vUC6uzcz8Pssz5lgrQWo7
74
74
  ratio1/io_formatter/default/default.py,sha256=gEy78cP2D5s0y8vQh4aHuxqz7D10gGfuiKF311QhrpE,494
75
75
  ratio1/ipfs/__init__.py,sha256=vXEDLUNUO6lOTMGa8iQ9Zf7ajIQq9GZuvYraAHt3meE,38
76
76
  ratio1/ipfs/ifps_keygen,sha256=PcoYuo4c89_C9FWrKq9K_28ruhKqnxNn1s3nLHiF1tc,879
77
- ratio1/ipfs/r1fs.py,sha256=dm52iGY2yEZBLThKsi632aMf1dOmyXAwmNzzYKue7_k,91598
77
+ ratio1/ipfs/r1fs.py,sha256=eNHDEG15CNc32PD-yoSTCwLhuOuyolZxqiYVrz_UkSA,92048
78
78
  ratio1/ipfs/ipfs_setup/ipfs.service,sha256=isTJQsktPy4i1yaDA9AC1OKdlTYvsCCRRAVX-EmGqAs,248
79
79
  ratio1/ipfs/ipfs_setup/launch_service.sh,sha256=GWhZyNqtohLxJg8Q_c8YnNZduu1ddXDU-IFRRMaEyiY,141
80
80
  ratio1/ipfs/ipfs_setup/restart.sh,sha256=9xHMgkUoAMI25jeaoDVFbCa_LjojYm3ubljW58RatKE,22
@@ -109,8 +109,8 @@ ratio1/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,10
109
109
  ratio1/utils/config.py,sha256=Elfkl7W4aDMvB5WZLiYlPXrecBncgTxb4hcKhQedMzI,10111
110
110
  ratio1/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
111
111
  ratio1/utils/oracle_sync/oracle_tester.py,sha256=aJOPcZhtbw1XPqsFG4qYpfv2Taj5-qRXbwJzrPyeXDE,27465
112
- ratio1-3.4.114.dist-info/METADATA,sha256=A5yjdTEJjpV-O6vi5L0occVYEoWWqeQTYTxrX0IzuEM,12256
113
- ratio1-3.4.114.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
114
- ratio1-3.4.114.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
115
- ratio1-3.4.114.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
116
- ratio1-3.4.114.dist-info/RECORD,,
112
+ ratio1-3.4.116.dist-info/METADATA,sha256=L03SRygJIAJjLiympluHxs9UORcRy5zfoNNxLvt-o2g,12256
113
+ ratio1-3.4.116.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
114
+ ratio1-3.4.116.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
115
+ ratio1-3.4.116.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
116
+ ratio1-3.4.116.dist-info/RECORD,,