ratio1 3.4.43__py3-none-any.whl → 3.4.45__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.43"
1
+ __VER__ = "3.4.45"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
@@ -2908,7 +2908,10 @@ class GenericSession(BaseDecentrAIObject):
2908
2908
  if cloudflare_token is not None:
2909
2909
  self.P("Using Cloudflare token from environment variable EE_CLOUDFLARE_TOKEN", color='g')
2910
2910
  if not isinstance(cloudflare_token, str):
2911
- raise ValueError(f"`cloudflare` must be a string when using cloudflare tunnel engine. {type(cloudflare_token)} provided.")
2911
+ cloudflare_token = None
2912
+ warn_msg = f"WARNING! Without a pre-defined `cloudflare_token`, the URL will be generated automatically, "
2913
+ warn_msg += "but it will not be persistent across restarts."
2914
+ self.P(warn_msg, color='y', show=True)
2912
2915
  cloudflare_kwargs = {
2913
2916
  "cloudflare_token": cloudflare_token,
2914
2917
  }
@@ -4045,6 +4048,10 @@ class GenericSession(BaseDecentrAIObject):
4045
4048
  err_msg = f"The `ngrok_edge_label` parameter is mandatory when creating a balanced web app tunneled with ngrok."
4046
4049
  err_msg += "This is needed in order for all instances to respond to the same URL."
4047
4050
  raise ValueError(err_msg)
4051
+ elif tunnel_engine == "cloudflare" and cloudflare_token is None:
4052
+ err_msg = f"The `cloudflare_token` parameter is mandatory when creating a balanced web app tunneled with cloudflare."
4053
+ err_msg += "This is needed in order for all instances to respond to the same URL."
4054
+ raise ValueError(err_msg)
4048
4055
  # endif ngrok used and ngrok_edge_label is None
4049
4056
 
4050
4057
  kwargs = self.maybe_clean_kwargs(
@@ -96,11 +96,10 @@ class WebappPipeline(Pipeline):
96
96
  self.app_url = "TUNNEL_ENGINE_DISABLED"
97
97
  else:
98
98
  if tunnel_engine.lower() == 'cloudflare':
99
- if cloudflare_token is None:
100
- raise ValueError("Cloudflare token must be provided when using Cloudflare as tunnel engine.")
101
99
  self.P("Using Cloudflare as tunnel engine", color="green")
102
- self.app_url = "URL_DEFINED_IN_CLOUDFLARE_TOKEN"
103
- tunnel_kwargs['cloudflare_token'] = cloudflare_token
100
+ if cloudflare_token is not None:
101
+ self.app_url = "URL_DEFINED_IN_CLOUDFLARE_TOKEN"
102
+ tunnel_kwargs['cloudflare_token'] = cloudflare_token
104
103
  else:
105
104
  self.P("Using ngrok as tunnel engine", color="green")
106
105
  if ngrok_edge_label is not None:
@@ -201,7 +201,7 @@ class BaseLogger(object):
201
201
  lib_ver = __VER__
202
202
  ver = "v{}".format(lib_ver) if lib_ver != "" else ""
203
203
  self.P(
204
- "NSDK {} initialized on [{}][{}].".format(
204
+ "R1SDK {} initialized on [{}][{}].".format(
205
205
  ver, self.MACHINE_NAME, self.get_processor_platform(),
206
206
  ),
207
207
  color='green',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ratio1
3
- Version: 3.4.43
3
+ Version: 3.4.45
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,16 +1,16 @@
1
1
  ratio1/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- ratio1/_ver.py,sha256=cedaRfU4PkTQM2eVR1u3lNjP6Azpi6X0V-oJ2Acfnqg,331
2
+ ratio1/_ver.py,sha256=DyYAVKy3hLVQtMWbQSTyJLGNsx7pQ8Majk60ovEC-iU,331
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
6
6
  ratio1/base/distributed_custom_code_presets.py,sha256=cvz5R88P6Z5V61Ce1vHVVh8bOkgXd6gve_vdESDNAsg,2544
7
- ratio1/base/generic_session.py,sha256=UuQv3Guz949rqyHgPY8fCzzlwiA0TuMscRbLnsloZ38,186058
7
+ ratio1/base/generic_session.py,sha256=tlnFwCld8Gizz3g20J_uwcjOT_V9KT1BLtQQp0nFty0,186524
8
8
  ratio1/base/instance.py,sha256=oQvwzzRvir7851wyhDx_BwN6y_VgsNWwYo53vN33QI4,21914
9
9
  ratio1/base/pipeline.py,sha256=szoHrk1qBdY6NKPUk3tUTsJx3XzYp5C2GTOlzRiQi48,62489
10
10
  ratio1/base/plugin_template.py,sha256=Gs438cSkhvxPujE4CRH_32pcuZaVwI9kia8E4VDRpSU,138794
11
11
  ratio1/base/responses.py,sha256=ZKBZmRhYDv8M8mQ5C_ahGsQvtWH4b9ImRcuerQdZmNw,6937
12
12
  ratio1/base/transaction.py,sha256=l2JCzTgH3-irFwCEBGrS3z8VOisA8GdC3zEfqgJOTG4,5138
13
- ratio1/base/webapp_pipeline.py,sha256=ebo68iOf3c9IZ0uj7cIizRtTJWFocuSw_aVg72bNWbE,3802
13
+ ratio1/base/webapp_pipeline.py,sha256=cH31-kuAIryUedObeW7qgxfU0ebK6qJKRxuHbbUHYVA,3706
14
14
  ratio1/base/payload/__init__.py,sha256=y8fBI8tG2ObNfaXFWjyWZXwu878FRYj_I8GIbHT4GKE,29
15
15
  ratio1/base/payload/payload.py,sha256=MoCeL6iZzl1an-4eqRpLW0iz6Yk3OvlBrymcmhWeecM,2689
16
16
  ratio1/bc/__init__.py,sha256=BI5pcqHdhwnMdbWTYDLW1cVP_844VtLra-lz7xprgsk,171
@@ -77,7 +77,7 @@ ratio1/ipfs/ipfs_setup/setup.sh,sha256=1yIIDjk0jU1nInQypKFF-8wqjVVyuk-UzREzpL7Gj
77
77
  ratio1/ipfs/ipfs_setup/show.sh,sha256=3EXyZppTNDrla0dH21m73s2lDNJXBAMn_DurYb30WfU,117
78
78
  ratio1/ipfs/ipfs_setup/write_key.sh,sha256=wLESi33j4UoSkXmYUUnI0kd9Sro6BMwtQp29UXxNVk4,164
79
79
  ratio1/logging/__init__.py,sha256=b79X45VC6c37u32flKB2GAK9f-RR0ocwP0JDCy0t7QQ,33
80
- ratio1/logging/base_logger.py,sha256=l-G2T35rTNx28tiQuGZBE-bCxGrMGIubyC0EdWdJrM4,70097
80
+ ratio1/logging/base_logger.py,sha256=iwNirMP38xEA26K8arwDjHXOjJhjE5q_SHzipjqAQzo,70098
81
81
  ratio1/logging/small_logger.py,sha256=BoCCEDManhe804zqfykZAvXUu9gV0_2NPebftUMIyPk,2998
82
82
  ratio1/logging/logger_mixins/__init__.py,sha256=fmDmGVDV41Dfoafe0yCZxJ_CqxWac4DSM8hO6UZnrcA,641
83
83
  ratio1/logging/logger_mixins/class_instance_mixin.py,sha256=x2vr_VrRAzGhjgayPxV9t3XtU-c0VoHZb6cjDbslJM8,2725
@@ -103,8 +103,8 @@ ratio1/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,10
103
103
  ratio1/utils/config.py,sha256=IMXAN9bpHePKEuTFGRRqFJXz_vBa-wi7s9gLhFEheRY,9953
104
104
  ratio1/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
105
105
  ratio1/utils/oracle_sync/oracle_tester.py,sha256=aJOPcZhtbw1XPqsFG4qYpfv2Taj5-qRXbwJzrPyeXDE,27465
106
- ratio1-3.4.43.dist-info/METADATA,sha256=jaQNtd8Er7skycSW8kIAesJSqpacNCvzGzy7scTWiJI,12248
107
- ratio1-3.4.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
- ratio1-3.4.43.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
109
- ratio1-3.4.43.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
110
- ratio1-3.4.43.dist-info/RECORD,,
106
+ ratio1-3.4.45.dist-info/METADATA,sha256=LHCIYIkIvXNehd-sURLHvre207r1Gb2pbi6rhROFlQQ,12248
107
+ ratio1-3.4.45.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
+ ratio1-3.4.45.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
109
+ ratio1-3.4.45.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
110
+ ratio1-3.4.45.dist-info/RECORD,,