cloudpss 4.5.6__tar.gz → 4.5.7__tar.gz
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.
- {cloudpss-4.5.6 → cloudpss-4.5.7}/PKG-INFO +1 -1
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/topology.py +1 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/httprequests.py +1 -1
- cloudpss-4.5.7/cloudpss/version.py +1 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss.egg-info/PKG-INFO +1 -1
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss.egg-info/SOURCES.txt +1 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test_ws.py +1 -1
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test_ws2.py +1 -1
- cloudpss-4.5.7/test/test_ws3.py +49 -0
- cloudpss-4.5.6/cloudpss/version.py +0 -1
- {cloudpss-4.5.6 → cloudpss-4.5.7}/README.md +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/job/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/job/job.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/job/messageStreamReceiver.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/job/messageStreamSender.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/model/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/model/model.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/model/revision.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/model/topology.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/utils/AsyncIterable.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/utils/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/asyncio/utils/httpAsyncRequest.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/function/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/function/function.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/function/functionExecution.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/function/job.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/DataManageModel.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/EvaluationModel.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/IESLabOpt.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/IESLabPlan.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/IESLabSimulation.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/PlanModel.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/ieslab/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/job.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/jobReceiver.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/messageStreamReceiver.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/messageStreamSender.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/EMTResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/IESLabSimulationResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/IESResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/PowerFlowResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/job/result/result.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/implements/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/implements/component.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/implements/diagram.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/implements/implement.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/jobDefinitions.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/model.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/model/revision.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/project/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/project/project.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/IESLabPlanResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/MessageStreamReceiver.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/receiver.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/result.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/runner.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/storage.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/runner/transform.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/IO.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/__init__.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/dataEncoder.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/graphqlUtil.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/matlab.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/utils/yamlLoader.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss/verify.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss.egg-info/dependency_links.txt +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss.egg-info/requires.txt +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/cloudpss.egg-info/top_level.txt +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/setup.cfg +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/setup.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-async.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-async2.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-async3.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-plot.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-plot1.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-sdk.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-sdk1.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-snapshot.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-topology.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-topology1.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test-yield.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test11.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test12.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test7950.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testAsync.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testEvent.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testRt-test.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testRt.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testRt2.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testSend.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test_in_new_web_1.py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/test_modepower_ampratio(3).py +0 -0
- {cloudpss-4.5.6 → cloudpss-4.5.7}/test/testb.py +0 -0
@@ -33,7 +33,7 @@ def request(method, uri, baseUrl=None, params={}, token=None, **kwargs):
|
|
33
33
|
if (uri.startswith('graphql')):
|
34
34
|
if 'X-Cloudpss-Version' not in r.headers:
|
35
35
|
raise Exception(
|
36
|
-
'当前SDK版本(ver
|
36
|
+
'当前SDK版本(ver '+__version__ +')与服务器版本(3.0.0 以下)不兼容,请更换服务器地址或更换SDK版本。')
|
37
37
|
os.environ['X_CLOUDPSS_VERSION'] = r.headers['X-Cloudpss-Version']
|
38
38
|
if float(r.headers['X-Cloudpss-Version']) >= 5:
|
39
39
|
raise Exception('当前SDK版本(ver '+__version__ +')与服务器版本(ver ' +
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '4.5.7'
|
@@ -52,7 +52,7 @@ class WebsocketClient():
|
|
52
52
|
return self._status
|
53
53
|
|
54
54
|
async def create(self):
|
55
|
-
asyncio.create_task(self.websocket_connect('ws://
|
55
|
+
asyncio.create_task(self.websocket_connect('ws://www.rpssc.top:52694/api/streams/id/a454e6b7-e677-41df-a4e8-6202ff3cb35e'))
|
56
56
|
|
57
57
|
async def main():
|
58
58
|
ws=WebsocketClient()
|
@@ -87,7 +87,7 @@ class WebsocketClient():
|
|
87
87
|
|
88
88
|
async def create(self):
|
89
89
|
# await self.websocket_connect('ws://10.101.10.45/api/streams/id/bb30285a-7d11-484b-a8b0-4855cf8bf8ed')
|
90
|
-
await self.websocket_connect('ws://
|
90
|
+
await self.websocket_connect('ws://www.rpssc.top:52694/api/streams/id/1d3b2722-dd65-42c2-ac91-a232e44582c9')
|
91
91
|
# asyncio.create_task(self.websocket_connect('ws://10.101.10.45/api/streams/id/bb30285a-7d11-484b-a8b0-4855cf8bf8ed'))
|
92
92
|
|
93
93
|
async def main():
|
@@ -0,0 +1,49 @@
|
|
1
|
+
|
2
|
+
import time
|
3
|
+
import threading
|
4
|
+
import websocket
|
5
|
+
# ws://10.101.10.45/api/streams/token/fe943635-0dc9-40c8-8a27-39d02af66894
|
6
|
+
|
7
|
+
|
8
|
+
class WebsocketClient():
|
9
|
+
message = []
|
10
|
+
_status=0
|
11
|
+
# __init__(self):
|
12
|
+
def on_close(self, *args, **kwargs):
|
13
|
+
self._status = 1
|
14
|
+
print("close")
|
15
|
+
def on_error(self, *args, **kwargs):
|
16
|
+
self._status = 1
|
17
|
+
print("error",args,kwargs)
|
18
|
+
def on_open(self,ws, *args, **kwargs):
|
19
|
+
self._status = 1
|
20
|
+
print("open")
|
21
|
+
def on_message(self, *args, **kwargs):
|
22
|
+
self._status = 0
|
23
|
+
print("on_message")
|
24
|
+
# websocket
|
25
|
+
def connect(self):
|
26
|
+
self._status = 0
|
27
|
+
path = "ws://www.rpssc.top:52694/api/streams/id/a454e6b7-e677-41df-a4e8-6202ff3cb35e"
|
28
|
+
self.ws = websocket.WebSocketApp(
|
29
|
+
path,
|
30
|
+
on_open=self.on_open,
|
31
|
+
on_message=self.on_message,
|
32
|
+
on_error=self.on_error,
|
33
|
+
on_close=self.on_close,
|
34
|
+
)
|
35
|
+
thread = threading.Thread(target=self.ws.run_forever, kwargs={'ping_interval':60,'ping_timeout':5,'reconnect':True})
|
36
|
+
thread.setDaemon(True)
|
37
|
+
thread.start()
|
38
|
+
while not self._status:
|
39
|
+
time.sleep(0)
|
40
|
+
|
41
|
+
def main():
|
42
|
+
ws=WebsocketClient()
|
43
|
+
ws.connect()
|
44
|
+
print("start")
|
45
|
+
while ws._status == 0:
|
46
|
+
time.sleep(0)
|
47
|
+
pass
|
48
|
+
if __name__ == '__main__':
|
49
|
+
main()
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '4.5.6'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|