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

@@ -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.7
4
4
 
@@ -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.7.dist-info/METADATA,sha256=eGZgoz3tuX6XgnkvVOA9opLBnAoWZ1KGrip_ULRO2hU,61
128
+ mns_common-1.2.6.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
129
+ mns_common-1.2.6.7.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
130
+ mns_common-1.2.6.7.dist-info/RECORD,,