ezKit 1.8.4__tar.gz → 1.8.5__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.
- {ezkit-1.8.4/ezKit.egg-info → ezkit-1.8.5}/PKG-INFO +1 -1
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/cls.py +33 -0
- {ezkit-1.8.4 → ezkit-1.8.5/ezKit.egg-info}/PKG-INFO +1 -1
- {ezkit-1.8.4 → ezkit-1.8.5}/setup.py +1 -1
- {ezkit-1.8.4 → ezkit-1.8.5}/LICENSE +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/MANIFEST.in +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/README.md +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/__init__.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/bottle.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/bottle_extensions.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/cipher.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/database.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/http.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/mongo.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/qywx.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/redis.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/sendemail.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/stock.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/token.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/utils.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit/xftp.py +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit.egg-info/SOURCES.txt +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit.egg-info/dependency_links.txt +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit.egg-info/requires.txt +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/ezKit.egg-info/top_level.txt +0 -0
- {ezkit-1.8.4 → ezkit-1.8.5}/setup.cfg +0 -0
@@ -254,3 +254,36 @@ def latest_data(
|
|
254
254
|
logger.error(f"{info} [失败]")
|
255
255
|
logger.exception(e)
|
256
256
|
return None
|
257
|
+
|
258
|
+
|
259
|
+
# --------------------------------------------------------------------------------------------------
|
260
|
+
|
261
|
+
|
262
|
+
def plate_codes(plate: str) -> list | None:
|
263
|
+
"""获取板块成分股代码"""
|
264
|
+
|
265
|
+
if utils.v_true(plate, str) is False:
|
266
|
+
logger.error("Incorrect function argument type: plate")
|
267
|
+
return None
|
268
|
+
|
269
|
+
info: str = "获取板块成分股代码"
|
270
|
+
|
271
|
+
try:
|
272
|
+
|
273
|
+
logger.info(f"{info} ......")
|
274
|
+
|
275
|
+
items = latest_data(payload=plate, data_type="plate")
|
276
|
+
|
277
|
+
if isinstance(items, list):
|
278
|
+
codes: list = [stock.coderename(i["secu_code"], restore=True) for i in items]
|
279
|
+
codes.sort()
|
280
|
+
logger.success(f"{info} [成功]")
|
281
|
+
return codes
|
282
|
+
|
283
|
+
logger.error(f"{info} [失败]")
|
284
|
+
return None
|
285
|
+
|
286
|
+
except Exception as e:
|
287
|
+
logger.error(f"{info} [失败]")
|
288
|
+
logger.exception(e)
|
289
|
+
return None
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|