neuronum 5.1.1__py3-none-any.whl → 5.2.0__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.

Potentially problematic release.


This version of neuronum might be problematic. Click here for more details.

neuronum/neuronum.py CHANGED
@@ -174,13 +174,16 @@ class Cell:
174
174
  async with session.post(url, json=TX) as response:
175
175
  response.raise_for_status()
176
176
  data = await response.json()
177
- if data["success"] == "activated":
177
+ if data.get("success") == "activated":
178
178
  async for operation in self.sync():
179
- label = operation.get("label")
180
- if label == "tx_response":
181
- operation_txID = operation.get("txID")
182
- if operation_txID == txID:
183
- return operation.get("data")
179
+ if operation.get("label") == "tx_response" and operation.get("txID") == txID:
180
+ data = operation.get("data", {})
181
+ if "json" in data:
182
+ return data
183
+ elif "html" in data:
184
+ return "Info: HTML response available. Please activate TX in browser."
185
+ else:
186
+ return "Info: Response received but contains no usable content."
184
187
  else:
185
188
  print(data["success"], data["message"])
186
189
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuronum
3
- Version: 5.1.1
3
+ Version: 5.2.0
4
4
  Summary: Official client library to interact with the Neuronum Network
5
5
  Home-page: https://neuronum.net
6
6
  Author: Neuronum Cybernetics
@@ -0,0 +1,10 @@
1
+ cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ cli/main.py,sha256=D-QZ7__wBMzuB2O1H-hsw_05UB_umWg_eUESkM4cTg0,26768
3
+ neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
4
+ neuronum/neuronum.py,sha256=9oNS8e1d95XfnKieycpQTK8huZY3rwGdNGBy9O0eVEQ,17433
5
+ neuronum-5.2.0.dist-info/licenses/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
6
+ neuronum-5.2.0.dist-info/METADATA,sha256=Xb7jfgOMTJKWBbrqNL09G-1bYzVDCSLHi6Gk4yTR6_4,3060
7
+ neuronum-5.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ neuronum-5.2.0.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
9
+ neuronum-5.2.0.dist-info/top_level.txt,sha256=ru8Fr84cHm6oHr_DcJ8-uaq3RTiuCRFIr6AC8V0zPu4,13
10
+ neuronum-5.2.0.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- cli/main.py,sha256=D-QZ7__wBMzuB2O1H-hsw_05UB_umWg_eUESkM4cTg0,26768
3
- neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
4
- neuronum/neuronum.py,sha256=qzxc9csSEnGX8wRC_14vzjJPQsCTC8wswhXno1Ih_Xw,17166
5
- neuronum-5.1.1.dist-info/licenses/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
6
- neuronum-5.1.1.dist-info/METADATA,sha256=YayitV3237xAWylvf8ppCHoWublzqwO66aISPucTwFs,3060
7
- neuronum-5.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- neuronum-5.1.1.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
9
- neuronum-5.1.1.dist-info/top_level.txt,sha256=ru8Fr84cHm6oHr_DcJ8-uaq3RTiuCRFIr6AC8V0zPu4,13
10
- neuronum-5.1.1.dist-info/RECORD,,