6 __version__ =
'1.0.4a4'
7 __description__ =
"Aestate framework for Python,You can see:https://gitee.com/cacode_cctvadmin/aestate"
9 __author_email__ =
"cacode@163.com"
10 __url__ =
"https://gitee.com/cacode_cctvadmin/aestate"
11 __license__ =
'Apache License 2.0'
12 __project_name__ =
'Aestate'
14 :: Aestate Framework :: (version:%s)
16 + / / /\ | | | | \ \ +
17 + / / / \ ___ ___| |_ __ _| |_ ___ \ \ +
18 + | | / /\ \ / _ \/ __| __/ _` | __/ _ \ | | +
19 + \ \ / ____ \ __/\__ \ || (_| | || __/ / / +
20 ========\_\=/_/====\_\___||___/\__\__,_|\__\___|=/_/========
24 :: Aestate Framework :: (version:%s)
26 + / / /\ | | | | \ \ +
27 + / / / \ ___ ___| |_ __ _| |_ ___ \ \ +
28 + | | / /\ \ / _ \/ __| __/ _` | __/ _ \ | | +
29 + \ \ / ____ \ __/\__ \ || (_| | || __/ / / +
30 ========\_\=/_/====\_\___||___/\__\__,_|\__\___|=/_/========
36 from prettytable
import PrettyTable
37 except ModuleNotFoundError
as e:
38 print(
"请先安装 [prettytable] 再执行 [-h] 命令,使用 [pip install prettytable]")
44 下面的@staticmethod主要是为了不想看见黄线警告,并没有其他意思
50 '显示aestate的logo和版本号,用于检查aestate是否安装成功',
60 "将文件内存在pojo对象的类生成到数据库中称为数据库的表"
61 "数据库格式化类型参考默认的 [mysql] 格式",
62 'aestate -create [文件名] [数据库类型 (可选)]'
66 "将数据库中的表同步生成到当前目录下的 [model.py],并默认命名为 [数据库命_表名]",
67 'aestate -m [--n [生成的文件名 (可选) ]] [--nn [生成的类名 (可选)]]'
77 'aestate -dec [被加密后的文件] [密码]'
82 'aestate -check [文件名] [数据库名]'
92 'aestate -startproject 项目名'
106 db_name = self.
args[3]
108 raise IndexError(
"为了保证数据库的sql执行顺利,请填写pojo存在的文件名和数据库名称")
110 temp_module = importlib.import_module(file)
112 temp_classes = inspect.getmembers(temp_module, inspect.isclass)
113 for name, class_
in temp_classes:
133 db_name = self.args[3]
135 raise IndexError(
"为了保证数据库的sql执行顺利,请填写pojo存在的文件名和数据库名称")
137 temp_module = importlib.import_module(file)
139 temp_classes = inspect.getmembers(temp_module, inspect.isclass)
140 for name, class_
in temp_classes:
145 table = PrettyTable([
"命令",
"使用方法",
"描述"])
147 table.junction_char =
'-'
148 [table.add_row([k, v[2], v[1]])
for k, v
in self.
c.items()]