mns-common 1.2.6.6__py3-none-any.whl → 1.2.6.8__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.

@@ -106,7 +106,7 @@ def convert_to_float(value):
106
106
  elif '%' in value:
107
107
  return float(value.replace('%', '').replace(' ', '')) / 100
108
108
  elif '万' in value:
109
- return float(value.replace('万', '').replace(' ', '').replace('元', '')) * 1e5
109
+ return float(value.replace('万', '').replace(' ', '').replace('元', '')) * 1e4
110
110
  elif '未披露' in value:
111
111
  return 0
112
112
  return -1
@@ -118,5 +118,5 @@ mongodb_util = MongodbUtil('27017')
118
118
  if __name__ == '__main__':
119
119
  stock_account_info = mongodb_util.find_query_data('stock_account_info', {"type": "ths_cookie", })
120
120
  ths_cookie_test = list(stock_account_info['cookie'])[0]
121
- company_df_test = get_company_hold_info('000617', ths_cookie_test)
121
+ company_df_test = get_company_hold_info('000895', ths_cookie_test)
122
122
  print(company_df_test)
@@ -143,3 +143,8 @@ def calculate_index(real_time_quotes_now_df):
143
143
  def group_by_industry_sum(real_time_quotes_now, field1, field2):
144
144
  df_series = real_time_quotes_now.groupby(by=[field1])[field2].sum()
145
145
  return pd.DataFrame({field1: df_series.index, field2: df_series.values})
146
+
147
+
148
+
149
+
150
+
@@ -0,0 +1,7 @@
1
+ import sys
2
+ import os
3
+
4
+ file_path = os.path.abspath(__file__)
5
+ end = file_path.index('mns') + 16
6
+ project_path = file_path[0:end]
7
+ sys.path.append(project_path)
@@ -0,0 +1,26 @@
1
+ import sys
2
+ import os
3
+
4
+ file_path = os.path.abspath(__file__)
5
+ end = file_path.index('mns') + 16
6
+ project_path = file_path[0:end]
7
+ sys.path.append(project_path)
8
+ from mns_common.db.MongodbUtil import MongodbUtil
9
+
10
+ mongodb_util = MongodbUtil('27017')
11
+
12
+ from functools import lru_cache
13
+
14
+
15
+ @lru_cache(maxsize=None)
16
+ def get_ths_cookie():
17
+ stock_account_info = mongodb_util.find_query_data('stock_account_info', {"type": "ths_cookie", })
18
+ ths_cookie = list(stock_account_info['cookie'])[0]
19
+ return ths_cookie
20
+
21
+
22
+ @lru_cache(maxsize=None)
23
+ def get_em_cookie():
24
+ stock_account_info = mongodb_util.find_query_data('stock_account_info', {"type": "em_cookie", })
25
+ em_cookie = list(stock_account_info['cookie'])[0]
26
+ return em_cookie
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns_common
3
- Version: 1.2.6.6
3
+ Version: 1.2.6.8
4
4
 
@@ -40,7 +40,7 @@ mns_common/api/ths/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE
40
40
  mns_common/api/ths/big_deal/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
41
41
  mns_common/api/ths/big_deal/ths_big_deal_api.py,sha256=gxtIUbowxx8gDJZfT2RISrhXVmvsgbdclYbxUiZsTlY,3644
42
42
  mns_common/api/ths/company/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
43
- mns_common/api/ths/company/ths_company_info_api.py,sha256=dwncEtzmYCI36T8aGMaT96pgMf3F54R5PQ8z2W7-hrQ,5929
43
+ mns_common/api/ths/company/ths_company_info_api.py,sha256=KMo_JWynsgrtaILq_bwsSIQoQHoAAn2ieeEzQR2gpDE,5929
44
44
  mns_common/api/ths/concept/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
45
45
  mns_common/api/ths/concept/app/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
46
46
  mns_common/api/ths/concept/app/ths_concept_detail_app.py,sha256=pPrpntV1tQlgdsSeHaNfde-Q6RM_bRH2kVH_MCloW8s,7087
@@ -58,7 +58,7 @@ mns_common/api/ths/zt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
58
58
  mns_common/api/ths/zt/ths_stock_zt_pool_api.py,sha256=GIYdc5J7ZrV25Elbf0n3bBZOc7x4OrlI0jFrO3du8lY,10756
59
59
  mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py,sha256=ohkeXyUSvxie2YqFPxqy9eLAHyFKQ5nx9U0JcR5LKeQ,16349
60
60
  mns_common/component/__init__.py,sha256=8b2PuXJM5fLoq71cWPXp695czQuaRtyR6OVHajGjDPc,161
61
- mns_common/component/common_service_fun_api.py,sha256=71_w6mKAmdISumjlc5xPPMmO8W_nWeiw11arRohh9Ts,5211
61
+ mns_common/component/common_service_fun_api.py,sha256=3wlD3FlZ8W5X6indKZIX-ol48xNZX_UmeLnDxP10vvA,5221
62
62
  mns_common/component/cache/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
63
63
  mns_common/component/cache/cache_service.py,sha256=QX7tjR1iGsoCyGt6O41w8aRbZ-3xXQ-53Ps3nmUzAGQ,809
64
64
  mns_common/component/classify/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
@@ -70,6 +70,8 @@ mns_common/component/company/company_common_service_new_api.py,sha256=FX3Uwk1dEz
70
70
  mns_common/component/concept/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
71
71
  mns_common/component/concept/kpl_concept_common_service_api.py,sha256=Ruc3INOhVjB0X1LeMRX0zL3uhv9OLweG2hj6wkZffow,3235
72
72
  mns_common/component/concept/ths_concept_common_service_api.py,sha256=KkbEnBTz3HZs8mSJ-2FX-UrPSlJfMOd8xSXRmtDpqPc,9682
73
+ mns_common/component/cookie/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
74
+ mns_common/component/cookie/cookie_info_service.py,sha256=IIFKj84dnBrUOt2Wl6kbCj-BDdFX_X9z8IIk4LxLNTc,754
73
75
  mns_common/component/data/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
74
76
  mns_common/component/data/data_init_api.py,sha256=MydFBrwP61pka9jK7rrMz3HF00meRUOi4m4_5FfyfUw,5030
75
77
  mns_common/component/deal/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
@@ -122,7 +124,7 @@ mns_common/utils/date_handle_util.py,sha256=qkEyKLYiVq6qpKVp32MLKwRtGKVBK6AY5at2
122
124
  mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
123
125
  mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
124
126
  mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
125
- mns_common-1.2.6.6.dist-info/METADATA,sha256=ZN43JdDEfoyLPvsm-5waINGk1OuL7B5mbW6MVM4Buss,61
126
- mns_common-1.2.6.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
127
- mns_common-1.2.6.6.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
128
- mns_common-1.2.6.6.dist-info/RECORD,,
127
+ mns_common-1.2.6.8.dist-info/METADATA,sha256=U-6qDdjR_30m9pEH6H0zBVe1yP2dFVfFWg6mgizGtE4,61
128
+ mns_common-1.2.6.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
129
+ mns_common-1.2.6.8.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
130
+ mns_common-1.2.6.8.dist-info/RECORD,,