mns-common 1.2.5.3__py3-none-any.whl → 1.2.5.4__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 mns-common might be problematic. Click here for more details.
- mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py +4 -2
- mns_common/component/hk/__init__.py +7 -0
- mns_common/component/hk/company_hk_service_api.py +34 -0
- mns_common/constant/db_name_constant.py +3 -0
- mns_common/db/MongodbUtil.py +2 -2
- {mns_common-1.2.5.3.dist-info → mns_common-1.2.5.4.dist-info}/METADATA +1 -1
- {mns_common-1.2.5.3.dist-info → mns_common-1.2.5.4.dist-info}/RECORD +9 -7
- {mns_common-1.2.5.3.dist-info → mns_common-1.2.5.4.dist-info}/WHEEL +0 -0
- {mns_common-1.2.5.3.dist-info → mns_common-1.2.5.4.dist-info}/top_level.txt +0 -0
|
@@ -273,6 +273,8 @@ def merge_zt_reason(now_zt_pool_df, str_day, last_trade_zt):
|
|
|
273
273
|
logger.error("获取涨停原因异常:{}", e)
|
|
274
274
|
|
|
275
275
|
last_trade_zt_copy = last_trade_zt.copy()
|
|
276
|
+
if "zt_reason" not in last_trade_zt.columns:
|
|
277
|
+
last_trade_zt_copy['zt_reason'] = '暂无'
|
|
276
278
|
last_trade_zt_copy = last_trade_zt_copy[['symbol', 'zt_reason']]
|
|
277
279
|
|
|
278
280
|
if data_frame_util.is_empty(zt_reason_df):
|
|
@@ -370,13 +372,13 @@ def zt_reason_group(zt_pool_df):
|
|
|
370
372
|
|
|
371
373
|
|
|
372
374
|
if __name__ == '__main__':
|
|
373
|
-
str_day_test = '2024-09-
|
|
375
|
+
str_day_test = '2024-09-30'
|
|
374
376
|
em_now_zt_pool_test = stock_zt_pool_api.stock_em_zt_pool_df(date_handle_util.no_slash_date(str_day_test))
|
|
375
377
|
ths_zt_pool_df = get_zt_reason(str_day_test)
|
|
376
378
|
|
|
377
379
|
em_now_zt_pool_test.loc[~(em_now_zt_pool_test['symbol'].isin(ths_zt_pool_df['symbol']))]
|
|
378
380
|
|
|
379
381
|
while True:
|
|
380
|
-
result_zt_df_test = get_now_zt_pool_with_reason(
|
|
382
|
+
result_zt_df_test = get_now_zt_pool_with_reason(str_day_test)
|
|
381
383
|
zt_reason_group(result_zt_df_test)
|
|
382
384
|
logger.info(1)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
file_path = os.path.abspath(__file__)
|
|
5
|
+
end = file_path.index('mns') + 14
|
|
6
|
+
project_path = file_path[0:end]
|
|
7
|
+
sys.path.append(project_path)
|
|
8
|
+
from functools import lru_cache
|
|
9
|
+
from mns_common.db.MongodbUtil import MongodbUtil
|
|
10
|
+
import pandas as pd
|
|
11
|
+
import mns_common.utils.data_frame_util as data_frame_util
|
|
12
|
+
import mns_common.component.common_service_fun_api as common_service_fun_api
|
|
13
|
+
import mns_common.constant.db_name_constant as db_name_constant
|
|
14
|
+
|
|
15
|
+
mongodb_util = MongodbUtil('27017')
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@lru_cache(maxsize=None)
|
|
19
|
+
def get_hk_company_info():
|
|
20
|
+
query_field = {'symbol': 1,
|
|
21
|
+
'name': 1,
|
|
22
|
+
'industry': 1,
|
|
23
|
+
'hk_ggt': 1}
|
|
24
|
+
return mongodb_util.find_query_data_choose_field(db_name_constant.COMPANY_INFO_HK,
|
|
25
|
+
{}, query_field)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@lru_cache(maxsize=None)
|
|
29
|
+
def get_hk_company_industry_info():
|
|
30
|
+
query_field = {'_id': 1,
|
|
31
|
+
'industry': 1,
|
|
32
|
+
'number': 1}
|
|
33
|
+
return mongodb_util.find_query_data_choose_field(db_name_constant.HK_COMPANY_INDUSTRY,
|
|
34
|
+
{}, query_field)
|
mns_common/db/MongodbUtil.py
CHANGED
|
@@ -30,9 +30,9 @@ class MongodbUtil:
|
|
|
30
30
|
elif mac_address is not None and mac_address == ip_util.WINDOWS_MAC_ADDRESS_CD:
|
|
31
31
|
client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
|
|
32
32
|
elif '192.168.1' in ip_util.get_host_ip() and mac_address is not None and mac_address == ip_util.APPLE_AIR_MAC_ADDRESS:
|
|
33
|
-
client = pymongo.MongoClient("mongodb://
|
|
33
|
+
client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
|
|
34
34
|
else:
|
|
35
|
-
client = pymongo.MongoClient("mongodb://
|
|
35
|
+
client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
|
|
36
36
|
return client.patience
|
|
37
37
|
|
|
38
38
|
def group(self, query, coll_name):
|
|
@@ -51,7 +51,7 @@ mns_common/api/ths/wen_cai/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK
|
|
|
51
51
|
mns_common/api/ths/wen_cai/ths_wen_cai_api.py,sha256=TiDbKIB57ARrnGb70vSJ7-c7lodQqivwlC2IWs95xFw,4718
|
|
52
52
|
mns_common/api/ths/zt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
mns_common/api/ths/zt/ths_stock_zt_pool_api.py,sha256=GIYdc5J7ZrV25Elbf0n3bBZOc7x4OrlI0jFrO3du8lY,10756
|
|
54
|
-
mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py,sha256=
|
|
54
|
+
mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py,sha256=fMlhhDG0RXAdZPOmAYp-r_2WOADVWj2Dk2OduMbXSG8,16531
|
|
55
55
|
mns_common/component/__init__.py,sha256=8b2PuXJM5fLoq71cWPXp695czQuaRtyR6OVHajGjDPc,161
|
|
56
56
|
mns_common/component/common_service_fun_api.py,sha256=71_w6mKAmdISumjlc5xPPMmO8W_nWeiw11arRohh9Ts,5211
|
|
57
57
|
mns_common/component/cache/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
@@ -71,6 +71,8 @@ mns_common/component/data/data_init_api.py,sha256=MydFBrwP61pka9jK7rrMz3HF00meRU
|
|
|
71
71
|
mns_common/component/deal/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
72
72
|
mns_common/component/deal/deal_service_api.py,sha256=XV_L8qfeTPbojmNXFjnUe-5ZTp3ADT3ett0j-gPuPVI,3806
|
|
73
73
|
mns_common/component/deal/terminal_enum.py,sha256=JUkSTXLQW1fob05PCCzIBg_VKlGmqaJEa0GOvrQH6e0,275
|
|
74
|
+
mns_common/component/hk/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
75
|
+
mns_common/component/hk/company_hk_service_api.py,sha256=qtkG2YZ2bWpXKR9eaCmpdCiSptQxLa_jXvH3nThJ2Gw,1187
|
|
74
76
|
mns_common/component/industry/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
75
77
|
mns_common/component/industry/ths_industry_index_api.py,sha256=boSEyRfCcUtCrsbeErckKKpTboo2UcaKiiCnWJHzvAU,3252
|
|
76
78
|
mns_common/component/k_line/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
@@ -99,11 +101,11 @@ mns_common/component/zt/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3Hi
|
|
|
99
101
|
mns_common/component/zt/zt_common_service_api.py,sha256=6pHRLLJjKcLLBA-xXkAU8SE6DZ5dgVFBRVjJmhkL0II,11945
|
|
100
102
|
mns_common/constant/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
101
103
|
mns_common/constant/black_list_classify_enum.py,sha256=I8U_DcltzYvlWjgn-TFLImgVgPuO0lxMnEJAQJBljdo,3995
|
|
102
|
-
mns_common/constant/db_name_constant.py,sha256=
|
|
104
|
+
mns_common/constant/db_name_constant.py,sha256=wvS6UPGeopeCevSbnVCOha4Vks3vDTu-b9H8LId8LEk,3194
|
|
103
105
|
mns_common/constant/price_enum.py,sha256=nhcPxk0AFdQAp8IsNr5EP9xURLqqJuSl6ljIzTp7Wyo,1093
|
|
104
106
|
mns_common/constant/redis_msg_constant.py,sha256=fMtI_WbJ2IkMX4qGwvR5MkMO0NqU8XgUUZqQzHIRscU,501
|
|
105
107
|
mns_common/constant/self_choose_constant.py,sha256=QJVSwUpnXvMYA62V3_8ptDqBdI2J8S5FqI5rYSJTwT0,496
|
|
106
|
-
mns_common/db/MongodbUtil.py,sha256=
|
|
108
|
+
mns_common/db/MongodbUtil.py,sha256=oO6t_kKiC13uS4M3OyyQkc_ktfOKhBgWLu49LVy4QQo,11745
|
|
107
109
|
mns_common/db/MongodbUtilLocal.py,sha256=xLUTeeZ83BbqPtUEwy7QmPtkSfwPyNB_5ggkn-eMpBQ,7560
|
|
108
110
|
mns_common/db/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
109
111
|
mns_common/utils/__init__.py,sha256=xu36nA6MJTauswUWPfKIKH0E-lpOAHTw2TL5QI_6TeY,165
|
|
@@ -114,7 +116,7 @@ mns_common/utils/date_handle_util.py,sha256=qkEyKLYiVq6qpKVp32MLKwRtGKVBK6AY5at2
|
|
|
114
116
|
mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
|
|
115
117
|
mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
|
|
116
118
|
mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
|
|
117
|
-
mns_common-1.2.5.
|
|
118
|
-
mns_common-1.2.5.
|
|
119
|
-
mns_common-1.2.5.
|
|
120
|
-
mns_common-1.2.5.
|
|
119
|
+
mns_common-1.2.5.4.dist-info/METADATA,sha256=0NAmgLRmLOvxesiwWw2vqrrwCZy5b_ni79TD1d42GdE,61
|
|
120
|
+
mns_common-1.2.5.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
121
|
+
mns_common-1.2.5.4.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
122
|
+
mns_common-1.2.5.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|