longport 3.0.21__cp310-cp310-win_amd64.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.
longport/__init__.py ADDED
@@ -0,0 +1,23 @@
1
+ import sys
2
+
3
+ from .longport import openapi
4
+ from typing import Optional
5
+
6
+ sys.modules['longport.openapi'] = openapi
7
+
8
+
9
+ class OpenApiException(Exception):
10
+ def __init__(self, kind, code, trace_id, message):
11
+ self.kind = kind
12
+ self.code = code
13
+ self.trace_id = trace_id
14
+ self.message = message
15
+
16
+ def __str__(self):
17
+ if self.code != None:
18
+ return "OpenApiException: (kind=%s, code=%d, trace_id=%s) %s" % (self.kind, self.code, self.trace_id, self.message)
19
+ else:
20
+ return "OpenApiException: %s" % self.message
21
+
22
+
23
+ openapi.OpenApiException = OpenApiException
Binary file
longport/openapi.py ADDED
File without changes