ezKit 1.12.3__tar.gz → 1.12.4__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.
Files changed (28) hide show
  1. {ezkit-1.12.3/ezKit.egg-info → ezkit-1.12.4}/PKG-INFO +1 -1
  2. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/database.py +14 -1
  3. {ezkit-1.12.3 → ezkit-1.12.4/ezKit.egg-info}/PKG-INFO +1 -1
  4. {ezkit-1.12.3 → ezkit-1.12.4}/setup.py +1 -1
  5. {ezkit-1.12.3 → ezkit-1.12.4}/LICENSE +0 -0
  6. {ezkit-1.12.3 → ezkit-1.12.4}/MANIFEST.in +0 -0
  7. {ezkit-1.12.3 → ezkit-1.12.4}/README.md +0 -0
  8. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/__init__.py +0 -0
  9. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/_file.py +0 -0
  10. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/bottle.py +0 -0
  11. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/bottle_extensions.py +0 -0
  12. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/cipher.py +0 -0
  13. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/dockerhub.py +0 -0
  14. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/http.py +0 -0
  15. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/markdown_to_html.template +0 -0
  16. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/mongo.py +0 -0
  17. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/qywx.py +0 -0
  18. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/redis.py +0 -0
  19. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/sendemail.py +0 -0
  20. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/token.py +0 -0
  21. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/utils.py +0 -0
  22. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/xftp.py +0 -0
  23. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit/zabbix.py +0 -0
  24. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit.egg-info/SOURCES.txt +0 -0
  25. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit.egg-info/dependency_links.txt +0 -0
  26. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit.egg-info/requires.txt +0 -0
  27. {ezkit-1.12.3 → ezkit-1.12.4}/ezKit.egg-info/top_level.txt +0 -0
  28. {ezkit-1.12.3 → ezkit-1.12.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.3
3
+ Version: 1.12.4
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -13,10 +13,12 @@ from typing import Any, Type
13
13
  import pandas as pd
14
14
  from loguru import logger
15
15
  from sqlalchemy import CursorResult, Index, create_engine, text
16
- from sqlalchemy.orm import DeclarativeBase, Session
16
+ from sqlalchemy.orm import DeclarativeBase, Session, declarative_base
17
17
 
18
18
  from . import utils
19
19
 
20
+ Base = declarative_base()
21
+
20
22
 
21
23
  class Database:
22
24
  """Database"""
@@ -71,6 +73,17 @@ class Database:
71
73
 
72
74
  # ----------------------------------------------------------------------------------------------
73
75
 
76
+ def initialization_table(self, table: str):
77
+ """初始化表"""
78
+
79
+ # 初始化所有表
80
+ # db.metadata_init(Base)
81
+ # 初始化指定表
82
+ # database.metadata_init(Base, tables=[Base.metadata.tables['ashare']])
83
+ self.metadata_init(Base, tables=[Base.metadata.tables[table]])
84
+
85
+ # ----------------------------------------------------------------------------------------------
86
+
74
87
  def create_index(self, index_name, table_field) -> bool:
75
88
  # 创建索引
76
89
  # https://stackoverflow.com/a/41254430
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.3
3
+ Version: 1.12.4
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
4
4
 
5
5
  setup(
6
6
  name="ezKit",
7
- version="1.12.3",
7
+ version="1.12.4",
8
8
  author="septvean",
9
9
  author_email="septvean@gmail.com",
10
10
  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