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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ezKit
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ezKit
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
3
3
 
4
4
  setup(
5
5
  name='ezKit',
6
- version='1.8.4',
6
+ version='1.8.5',
7
7
  author='septvean',
8
8
  author_email='septvean@gmail.com',
9
9
  description='Easy Kit',
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