gjdatac-api 0.2.6__tar.gz → 0.2.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.
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/PKG-INFO +1 -1
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api/data_api_class.py +7 -6
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api/dolphindb_info.py +0 -3
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api.egg-info/PKG-INFO +1 -1
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/setup.py +1 -1
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api/__init__.py +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api/dict_data.py +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api/instrument_class.py +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api.egg-info/SOURCES.txt +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api.egg-info/dependency_links.txt +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api.egg-info/requires.txt +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/gjdatac_api.egg-info/top_level.txt +0 -0
- {gjdatac_api-0.2.6 → gjdatac_api-0.2.7}/setup.cfg +0 -0
|
@@ -24,7 +24,7 @@ from .instrument_class import Instrument
|
|
|
24
24
|
|
|
25
25
|
class GJDataC:
|
|
26
26
|
|
|
27
|
-
def __init__(self, host, port, user_id, password):
|
|
27
|
+
def __init__(self, host, port, user_id, password, dolphindb_service):
|
|
28
28
|
"""
|
|
29
29
|
用于定义一些不同接口所需的变量以及一些初始化操作
|
|
30
30
|
:param host: 数据库地址
|
|
@@ -56,11 +56,12 @@ class GJDataC:
|
|
|
56
56
|
# 连接数据库
|
|
57
57
|
db_session = ddb.session()
|
|
58
58
|
# 原始方式
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
if not self.sites:
|
|
60
|
+
success = db_session.connect(self.host, self.port, self.user_id, self.password)
|
|
61
|
+
else:
|
|
62
|
+
# 创建连接;开启高可用,并指定sites为所有可用节点的ip:port
|
|
63
|
+
success = db_session.connect(self.host, self.port, self.user_id, self.password, highAvailability=True,
|
|
64
|
+
highAvailabilitySites=self.sites)
|
|
64
65
|
if not success:
|
|
65
66
|
raise Exception("please check your database connection information")
|
|
66
67
|
|
|
@@ -5,7 +5,7 @@ with open('description_info.md', 'r', encoding='utf-8') as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name='gjdatac_api', # 你的包名
|
|
8
|
-
version='0.2.
|
|
8
|
+
version='0.2.7', # 版本号
|
|
9
9
|
description='数据接口打包', # 包的简要描述
|
|
10
10
|
long_description=long_description, # 包的详细描述
|
|
11
11
|
long_description_content_type='text/markdown', # 描述文件的类型
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|