mwgencode 1.4.7__tar.gz → 1.5.0__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.
- {mwgencode-1.4.7 → mwgencode-1.5.0}/CHANGES.txt +2 -0
- {mwgencode-1.4.7/mwgencode.egg-info → mwgencode-1.5.0}/PKG-INFO +10 -6
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gen_code.py +8 -5
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/gitignore.git +2 -1
- mwgencode-1.5.0/gencode/gencode/template/Dockerfile dg.tmp +59 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/Dockerfile.tmp +4 -4
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/__init__.pys +3 -1
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/setup.tmp +6 -6
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/swg_ctrl_code.pys +17 -15
- {mwgencode-1.4.7 → mwgencode-1.5.0/mwgencode.egg-info}/PKG-INFO +10 -6
- {mwgencode-1.4.7 → mwgencode-1.5.0}/mwgencode.egg-info/SOURCES.txt +1 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/mwgencode.egg-info/requires.txt +6 -5
- {mwgencode-1.4.7 → mwgencode-1.5.0}/setup.py +8 -6
- {mwgencode-1.4.7 → mwgencode-1.5.0}/LICENSE.txt +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/MANIFEST.in +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/README.rst +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/dd_models.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/ext.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/export_class2swgclass.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/gen_bo_models_code.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/gen_state_code.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/gen_swagger_code.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/gen_tests_code.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/babel.cfg +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/config-sample.ini +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/config.ini +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/create_new_table_run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/dockerignore.dock +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/file_utils.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/gencode.xmi +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/migrate_run.bat +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/migrate_run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/requirements.txt +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/run.sh +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/models_rm.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/seed_dev_data.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/seed_init.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/seed_rm.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/seed_run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/seeds/seed_utils.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/test__init__.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/test_run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/sample/utils.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/README.md +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/config.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/default.conf +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/docker-compose-dev.yaml +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/docker-compose.yaml +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/drone.tmp +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/flask_models.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/flask_models_base.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/gen_code_flask.yaml +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/gen_code_run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/k8s-tmp.yml +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/sample.mdj +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/supervisord.conf +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/swagger_file.yaml +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/swg_class.tmp +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/swg_package_mng.tmp +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/test_test_base.tmp +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/tests/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/tests/__init__.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/tests/init_test_data.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/tests/run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/tests/test_base.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/tests/test_classmng.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/uwsgi.ini +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/gencode/template/uwsgi_run.pys +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importmdj/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importmdj/import_dd_classes.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importmdj/import_swagger2_class.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importmdj/import_uml_models.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importxmi/__init__.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importxmi/import_classes.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importxmi/import_sequences.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importxmi/import_states.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/importxmi/import_swagger.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/swg2_class_models.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/uml_class_models.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/upgrade.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/gencode/utils.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/help.md +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/manage.py +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/mwgencode.egg-info/dependency_links.txt +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/mwgencode.egg-info/entry_points.txt +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/mwgencode.egg-info/top_level.txt +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/pyproject.toml +0 -0
- {mwgencode-1.4.7 → mwgencode-1.5.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mwgencode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: 根据starUML文档产生flask专案的代码
|
|
5
5
|
Home-page: https://bitbucket.org/maxwin-inc/gencode/src/
|
|
6
6
|
Author: cxhjet
|
|
@@ -15,26 +15,28 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
19
|
License-File: LICENSE.txt
|
|
19
20
|
Requires-Dist: mwutils>=0.1.41
|
|
20
21
|
Requires-Dist: mwauth>=0.4.49
|
|
21
|
-
Requires-Dist: mwsdk>=0.3.
|
|
22
|
+
Requires-Dist: mwsdk>=0.3.3
|
|
22
23
|
Requires-Dist: mwpermission>=0.1.26
|
|
23
24
|
Requires-Dist: mw-aiohttp-session>=0.1.13
|
|
24
25
|
Requires-Dist: mw-aiohttp-babel>=0.1.7
|
|
25
26
|
Requires-Dist: mw-aiohttp-security>=0.1.13
|
|
26
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: mwgencode-mcp>=0.1.4
|
|
28
|
+
Requires-Dist: SQLAlchemy>=2.0.44
|
|
27
29
|
Requires-Dist: pyJWT
|
|
28
30
|
Requires-Dist: python-consul
|
|
29
31
|
Requires-Dist: flask_migrate
|
|
30
32
|
Requires-Dist: flask-babel
|
|
31
33
|
Requires-Dist: Flask-Cors
|
|
32
34
|
Requires-Dist: Flask-Redis
|
|
33
|
-
Requires-Dist: Flask-SQLAlchemy>=
|
|
35
|
+
Requires-Dist: Flask-SQLAlchemy>=3.1.1
|
|
34
36
|
Requires-Dist: geojson
|
|
35
37
|
Requires-Dist: redis>=4.0.2
|
|
36
|
-
Requires-Dist: connexion[swagger-ui]>=
|
|
37
|
-
Requires-Dist: Flask>=
|
|
38
|
+
Requires-Dist: connexion[swagger-ui]>=3.3.0
|
|
39
|
+
Requires-Dist: Flask>=3.1.2
|
|
38
40
|
Requires-Dist: Werkzeug>=0.15.5
|
|
39
41
|
Requires-Dist: yarl>=1.4.2
|
|
40
42
|
Requires-Dist: xlrd
|
|
@@ -215,6 +217,8 @@ maxwin 开发框架使用的 lib
|
|
|
215
217
|
|
|
216
218
|
|
|
217
219
|
Changes
|
|
220
|
+
1.5.0(2025-11-17)
|
|
221
|
+
- 升级支持python12
|
|
218
222
|
|
|
219
223
|
1.3.10(2024-02-26)
|
|
220
224
|
- drone.yml 支持tag
|
|
@@ -209,6 +209,9 @@ class GenProject_Flask(GenProject_base):
|
|
|
209
209
|
saveUTF8File(os.path.join(os.path.realpath(self.rootpath), 'Dockerfile'),
|
|
210
210
|
[self.env.get_template('Dockerfile.tmp').render(swagger=gen.swager)],
|
|
211
211
|
exist_ok=False)
|
|
212
|
+
saveUTF8File(os.path.join(os.path.realpath(self.rootpath), 'Dockerfile_dg'),
|
|
213
|
+
[self.env.get_template('Dockerfile_dg.tmp').render(swagger=gen.swager)],
|
|
214
|
+
exist_ok=False)
|
|
212
215
|
saveUTF8File(os.path.join(os.path.realpath(self.rootpath), '.drone.yml'),
|
|
213
216
|
[self.env.get_template('drone.tmp').render(swagger=gen.swager)],
|
|
214
217
|
exist_ok=False)
|
|
@@ -235,11 +238,11 @@ class GenProject_Flask(GenProject_base):
|
|
|
235
238
|
exist_ok=False
|
|
236
239
|
)
|
|
237
240
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
saveUTF8File(os.path.join(os.path.realpath(self.rootpath), 'gen_code_run.py'),
|
|
242
|
+
[self.env.get_template('gen_code_run.pys').render(root_path=os.path.split(self.rootpath)[-1],
|
|
243
|
+
swagger=gen.swager)],
|
|
244
|
+
exist_ok=False
|
|
245
|
+
)
|
|
243
246
|
|
|
244
247
|
|
|
245
248
|
saveUTF8File(os.path.join(os.path.realpath(self.rootpath), f'{gen.swager.name}-k8s.yml'),
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
FROM maxwinch/flask-py3.12:v1 as build
|
|
2
|
+
COPY ./requirements.txt /var/requirements.txt
|
|
3
|
+
COPY . /var/{{swagger.name}}
|
|
4
|
+
ENV PIP_INDEX_URL https://mirrors.aliyun.com/pypi/simple
|
|
5
|
+
WORKDIR /var/{{swagger.name}}
|
|
6
|
+
RUN echo "https://mirrors.aliyun.com/alpine/latest-stable/main" > /etc/apk/repositories \
|
|
7
|
+
&& echo "https://mirrors.aliyun.com/alpine/latest-stable/community" >> /etc/apk/repositories \
|
|
8
|
+
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
|
9
|
+
&& apk add --update --no-cache --virtual .build-deps \
|
|
10
|
+
make \
|
|
11
|
+
gcc \
|
|
12
|
+
libc-dev \
|
|
13
|
+
jpeg-dev \
|
|
14
|
+
zlib-dev \
|
|
15
|
+
linux-headers \
|
|
16
|
+
python3-dev \
|
|
17
|
+
# 解决 ImageFont.truetype 出错的问题
|
|
18
|
+
freetype \
|
|
19
|
+
freetype-dev \
|
|
20
|
+
&& pip install --upgrade pip \
|
|
21
|
+
&& pip3 install -r /var/requirements.txt \
|
|
22
|
+
&& python /var/{{swagger.name}}/setup.py install \
|
|
23
|
+
&& find /var/{{swagger.name}} -depth \
|
|
24
|
+
\( \
|
|
25
|
+
\( -type d -a -name app -o -name docs -o -name build -o -name .git -o -name migrations \
|
|
26
|
+
-o -name .idea -o -name __pycache__ -o -name swagger -o -name seeds -o -name -tests \) \
|
|
27
|
+
-o \
|
|
28
|
+
\( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.c' \
|
|
29
|
+
-o -name '*.md' -o -name '*.pot' -o -name 'config-sample.ini' \
|
|
30
|
+
-o -name 'migrate_run.*' -o -name '*.mdj' -o -name '*.sqlite' -o -name '*.yaml' \
|
|
31
|
+
-o -name 'gen_code_run.py' -o -name 'run.sh' -o -name 'run-dev.sh' -o -name 'uwsgi-dev.ini' \
|
|
32
|
+
-o -name 'setup.py' -o -name 'requirements.txt' -o -name 'Dockerfile' -o -name 'Dockerfile_dev' \
|
|
33
|
+
-o -name 'docker-compose-dev.yaml' \) \
|
|
34
|
+
\) -exec rm -rf '{}' + \
|
|
35
|
+
# 删除APP package 中的源码
|
|
36
|
+
&& find /usr/local/lib/python3.12/site-packages/app -depth \
|
|
37
|
+
\( \
|
|
38
|
+
\( -type d -a -name __pycache__ \) \
|
|
39
|
+
-o \
|
|
40
|
+
\( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.c' -o -name '*.py' \) \
|
|
41
|
+
\) -exec rm -rf '{}' + \
|
|
42
|
+
&& find /usr/local -depth \
|
|
43
|
+
\( \
|
|
44
|
+
\( -type d -a -name test -o -name tests -o -name __pycache__ \) \
|
|
45
|
+
-o \
|
|
46
|
+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
|
47
|
+
\) -exec rm -rf '{}' + \
|
|
48
|
+
&& runDeps="$( \
|
|
49
|
+
scanelf --needed --nobanner --recursive /usr/local \
|
|
50
|
+
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
|
51
|
+
| sort -u \
|
|
52
|
+
| xargs -r apk info --installed \
|
|
53
|
+
| sort -u \
|
|
54
|
+
)" \
|
|
55
|
+
&& apk add --virtual .python-rundeps $runDeps \
|
|
56
|
+
&& apk del .build-deps
|
|
57
|
+
FROM maxwinch/flask-py3.12:v1
|
|
58
|
+
COPY --from=build /var/{{swagger.name}} /var/{{swagger.name}}
|
|
59
|
+
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM maxwinch/flask-py3.
|
|
1
|
+
FROM maxwinch/flask-py3.12:v1 as build
|
|
2
2
|
COPY ./requirements.txt /var/requirements.txt
|
|
3
3
|
COPY . /var/{{swagger.name}}
|
|
4
4
|
WORKDIR /var/{{swagger.name}}
|
|
@@ -29,7 +29,7 @@ RUN apk add --update --no-cache --virtual .build-deps \
|
|
|
29
29
|
-o -name 'docker-compose-dev.yaml' \) \
|
|
30
30
|
\) -exec rm -rf '{}' + \
|
|
31
31
|
# 删除APP package 中的源码
|
|
32
|
-
&& find /usr/local/lib/python3.
|
|
32
|
+
&& find /usr/local/lib/python3.12/site-packages/app -depth \
|
|
33
33
|
\( \
|
|
34
34
|
\( -type d -a -name __pycache__ \) \
|
|
35
35
|
-o \
|
|
@@ -50,6 +50,6 @@ RUN apk add --update --no-cache --virtual .build-deps \
|
|
|
50
50
|
)" \
|
|
51
51
|
&& apk add --virtual .python-rundeps $runDeps \
|
|
52
52
|
&& apk del .build-deps
|
|
53
|
-
FROM maxwinch/flask-py3.
|
|
53
|
+
FROM maxwinch/flask-py3.12:v1
|
|
54
54
|
COPY --from=build /var/{{swagger.name}} /var/{{swagger.name}}
|
|
55
|
-
COPY --from=build /usr/local/lib/python3.
|
|
55
|
+
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
|
|
@@ -90,10 +90,12 @@ def create_app_swagger(config_name):
|
|
|
90
90
|
|
|
91
91
|
return app_swg
|
|
92
92
|
|
|
93
|
-
@babel.localeselector
|
|
93
|
+
# @babel.localeselector
|
|
94
94
|
def get_locale():
|
|
95
95
|
# 默认取英文
|
|
96
96
|
lang = get_lang(None)
|
|
97
97
|
# 当前版本的 flask_babel 只支持 “_”区隔
|
|
98
98
|
return lang.replace('-','_')
|
|
99
99
|
|
|
100
|
+
babel.locale_selector = get_locale
|
|
101
|
+
|
|
@@ -29,17 +29,17 @@ try:
|
|
|
29
29
|
# 有多个目录
|
|
30
30
|
# package_data={'app': package_datas},
|
|
31
31
|
data_files=[
|
|
32
|
-
# ('/usr/local/lib/python3.
|
|
32
|
+
# ('/usr/local/lib/python3.12/site-packages/app/translations/en/LC_MESSAGES',
|
|
33
33
|
# ['app/translations/en/LC_MESSAGES/messages.mo']),
|
|
34
|
-
# ('/usr/local/lib/python3.
|
|
34
|
+
# ('/usr/local/lib/python3.12/site-packages/app/translations/zh_Hans_CN/LC_MESSAGES',
|
|
35
35
|
# ['app/translations/zh_Hans_CN/LC_MESSAGES/messages.mo']),
|
|
36
|
-
# ('/usr/local/lib/python3.
|
|
36
|
+
# ('/usr/local/lib/python3.12/site-packages/app/translations/zh_Hant_TW/LC_MESSAGES',
|
|
37
37
|
# ['app/translations/zh_Hant_TW/LC_MESSAGES/messages.mo']),
|
|
38
|
-
# ('/usr/local/lib/python3.
|
|
38
|
+
# ('/usr/local/lib/python3.12/site-packages/app/translations/vi_VN/LC_MESSAGES',
|
|
39
39
|
# ['app/translations/vi_VN/LC_MESSAGES/messages.mo']),
|
|
40
|
-
# ('/usr/local/lib/python3.
|
|
40
|
+
# ('/usr/local/lib/python3.12/site-packages/app/translations/ja/LC_MESSAGES',
|
|
41
41
|
# ['app/translations/ja/LC_MESSAGES/messages.mo']),
|
|
42
|
-
('/usr/local/lib/python3.
|
|
42
|
+
('/usr/local/lib/python3.12/site-packages/swagger/v1_0',
|
|
43
43
|
['swagger/v1_0/{{swagger.name}}.yaml'])
|
|
44
44
|
]
|
|
45
45
|
)
|
|
@@ -36,40 +36,42 @@ def {{path.name.replace('{', '').replace('}', '').replace('-', '_').replace('/',
|
|
|
36
36
|
except Exception as e:
|
|
37
37
|
db.session.rollback()
|
|
38
38
|
current_app.logger.error(str(e),exc_info=True)
|
|
39
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
40
|
-
return set_timezone(data.to_json()), 201, {"content-type": "application/json
|
|
39
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
40
|
+
return set_timezone(data.to_json()), 201, {"content-type": "application/json"}
|
|
41
41
|
{% endif %}
|
|
42
42
|
|
|
43
43
|
{% if act.action == 'put' %}
|
|
44
44
|
try:
|
|
45
45
|
body = todatetime({k: v for k, v in body.items() if k in {{act.default_resp.ref_name.capitalize()}}.__table__.columns.keys()},[])
|
|
46
46
|
{{act.default_resp.ref_name.capitalize()}}.query.filter({{act.default_resp.ref_name.capitalize()}}.id == id).update(body)
|
|
47
|
+
db.session.commit()
|
|
47
48
|
except Exception as e:
|
|
48
49
|
db.session.rollback()
|
|
49
50
|
current_app.logger.error(str(e),exc_info=True)
|
|
50
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
51
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
51
52
|
data = {{act.default_resp.ref_name.capitalize()}}.query.filter_by(id=id).first_or_404()
|
|
52
|
-
return set_timezone(data.to_json()), 201, {"content-type": "application/json
|
|
53
|
+
return set_timezone(data.to_json()), 201, {"content-type": "application/json"}
|
|
53
54
|
{% endif %}
|
|
54
55
|
{% if act.action == 'delete' %}
|
|
55
56
|
try:
|
|
56
57
|
db.session.query({{act.default_resp.ref_name.capitalize()}}).filter({{act.default_resp.ref_name.capitalize()}}.id == id).delete()
|
|
58
|
+
db.session.commit()
|
|
57
59
|
except Exception as e:
|
|
58
60
|
db.session.rollback()
|
|
59
61
|
current_app.logger.error(str(e),exc_info=True)
|
|
60
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
62
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
61
63
|
return "", 204
|
|
62
64
|
{% endif %}
|
|
63
65
|
|
|
64
66
|
{% if act.action == 'get' and not act.default_resp.is_array %}
|
|
65
67
|
data = {{act.default_resp.ref_name.capitalize()}}.query.filter_by(id=id).first_or_404()
|
|
66
|
-
return set_timezone(data.to_json()), 200, {"content-type": "application/json
|
|
68
|
+
return set_timezone(data.to_json()), 200, {"content-type": "application/json"}
|
|
67
69
|
{% endif %}
|
|
68
70
|
|
|
69
71
|
{% if act.action == 'get' and act.default_resp.is_array %}
|
|
70
72
|
{% if act.has_page %}
|
|
71
73
|
datap = {{act.default_resp.ref_name.capitalize()}}.query
|
|
72
|
-
header = {"content-type": "application/json
|
|
74
|
+
header = {"content-type": "application/json"}
|
|
73
75
|
# todo add custom filter,sample:
|
|
74
76
|
#if name:
|
|
75
77
|
# datap = datap.filter({{act.default_resp.ref_name.capitalize()}}.name.like('%'+name+'%'))
|
|
@@ -86,7 +88,7 @@ def {{path.name.replace('{', '').replace('}', '').replace('-', '_').replace('/',
|
|
|
86
88
|
#if name:
|
|
87
89
|
# datap = datap.filter({{act.default_resp.ref_name.capitalize()}}.name.like('%'+name+'%'))
|
|
88
90
|
datas = datap.all()
|
|
89
|
-
return [set_timezone(data.to_json()) for data in datas],200,{"content-type": "application/json
|
|
91
|
+
return [set_timezone(data.to_json()) for data in datas],200,{"content-type": "application/json"}
|
|
90
92
|
{% endif %}
|
|
91
93
|
{% endif %}
|
|
92
94
|
|
|
@@ -94,31 +96,31 @@ def {{path.name.replace('{', '').replace('}', '').replace('-', '_').replace('/',
|
|
|
94
96
|
{% if act.action == 'post' %}
|
|
95
97
|
try:
|
|
96
98
|
data = {}
|
|
97
|
-
return data, 201, {"content-type": "application/json
|
|
99
|
+
return data, 201, {"content-type": "application/json"}
|
|
98
100
|
except Exception as e:
|
|
99
101
|
current_app.logger.error(str(e),exc_info=True)
|
|
100
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
102
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
101
103
|
{% elif act.action == 'put' %}
|
|
102
104
|
try:
|
|
103
105
|
data = {}
|
|
104
|
-
return data, 201, {"content-type": "application/json
|
|
106
|
+
return data, 201, {"content-type": "application/json"}
|
|
105
107
|
except Exception as e:
|
|
106
108
|
current_app.logger.error(str(e),exc_info=True)
|
|
107
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
109
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
108
110
|
{% elif act.action == 'delete' %}
|
|
109
111
|
try:
|
|
110
112
|
data = {}
|
|
111
113
|
return "", 204
|
|
112
114
|
except Exception as e:
|
|
113
115
|
current_app.logger.error(str(e),exc_info=True)
|
|
114
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
116
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
115
117
|
{% elif act.action == 'get' %}
|
|
116
118
|
try:
|
|
117
119
|
data = {}
|
|
118
|
-
return data, 200, {"content-type": "application/json
|
|
120
|
+
return data, 200, {"content-type": "application/json"}
|
|
119
121
|
except Exception as e:
|
|
120
122
|
current_app.logger.error(str(e),exc_info=True)
|
|
121
|
-
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json
|
|
123
|
+
return {"error": get_err_msg(str(e))}, 422, {"content-type": "application/json"}
|
|
122
124
|
{% else %}
|
|
123
125
|
pass
|
|
124
126
|
{% endif %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mwgencode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: 根据starUML文档产生flask专案的代码
|
|
5
5
|
Home-page: https://bitbucket.org/maxwin-inc/gencode/src/
|
|
6
6
|
Author: cxhjet
|
|
@@ -15,26 +15,28 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
19
|
License-File: LICENSE.txt
|
|
19
20
|
Requires-Dist: mwutils>=0.1.41
|
|
20
21
|
Requires-Dist: mwauth>=0.4.49
|
|
21
|
-
Requires-Dist: mwsdk>=0.3.
|
|
22
|
+
Requires-Dist: mwsdk>=0.3.3
|
|
22
23
|
Requires-Dist: mwpermission>=0.1.26
|
|
23
24
|
Requires-Dist: mw-aiohttp-session>=0.1.13
|
|
24
25
|
Requires-Dist: mw-aiohttp-babel>=0.1.7
|
|
25
26
|
Requires-Dist: mw-aiohttp-security>=0.1.13
|
|
26
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: mwgencode-mcp>=0.1.4
|
|
28
|
+
Requires-Dist: SQLAlchemy>=2.0.44
|
|
27
29
|
Requires-Dist: pyJWT
|
|
28
30
|
Requires-Dist: python-consul
|
|
29
31
|
Requires-Dist: flask_migrate
|
|
30
32
|
Requires-Dist: flask-babel
|
|
31
33
|
Requires-Dist: Flask-Cors
|
|
32
34
|
Requires-Dist: Flask-Redis
|
|
33
|
-
Requires-Dist: Flask-SQLAlchemy>=
|
|
35
|
+
Requires-Dist: Flask-SQLAlchemy>=3.1.1
|
|
34
36
|
Requires-Dist: geojson
|
|
35
37
|
Requires-Dist: redis>=4.0.2
|
|
36
|
-
Requires-Dist: connexion[swagger-ui]>=
|
|
37
|
-
Requires-Dist: Flask>=
|
|
38
|
+
Requires-Dist: connexion[swagger-ui]>=3.3.0
|
|
39
|
+
Requires-Dist: Flask>=3.1.2
|
|
38
40
|
Requires-Dist: Werkzeug>=0.15.5
|
|
39
41
|
Requires-Dist: yarl>=1.4.2
|
|
40
42
|
Requires-Dist: xlrd
|
|
@@ -215,6 +217,8 @@ maxwin 开发框架使用的 lib
|
|
|
215
217
|
|
|
216
218
|
|
|
217
219
|
Changes
|
|
220
|
+
1.5.0(2025-11-17)
|
|
221
|
+
- 升级支持python12
|
|
218
222
|
|
|
219
223
|
1.3.10(2024-02-26)
|
|
220
224
|
- drone.yml 支持tag
|
|
@@ -43,6 +43,7 @@ gencode/gencode/sample/seeds/seed_init.pys
|
|
|
43
43
|
gencode/gencode/sample/seeds/seed_rm.pys
|
|
44
44
|
gencode/gencode/sample/seeds/seed_run.pys
|
|
45
45
|
gencode/gencode/sample/seeds/seed_utils.pys
|
|
46
|
+
gencode/gencode/template/Dockerfile dg.tmp
|
|
46
47
|
gencode/gencode/template/Dockerfile.tmp
|
|
47
48
|
gencode/gencode/template/README.md
|
|
48
49
|
gencode/gencode/template/__init__.py
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
mwutils>=0.1.41
|
|
2
2
|
mwauth>=0.4.49
|
|
3
|
-
mwsdk>=0.3.
|
|
3
|
+
mwsdk>=0.3.3
|
|
4
4
|
mwpermission>=0.1.26
|
|
5
5
|
mw-aiohttp-session>=0.1.13
|
|
6
6
|
mw-aiohttp-babel>=0.1.7
|
|
7
7
|
mw-aiohttp-security>=0.1.13
|
|
8
|
-
|
|
8
|
+
mwgencode-mcp>=0.1.4
|
|
9
|
+
SQLAlchemy>=2.0.44
|
|
9
10
|
pyJWT
|
|
10
11
|
python-consul
|
|
11
12
|
flask_migrate
|
|
12
13
|
flask-babel
|
|
13
14
|
Flask-Cors
|
|
14
15
|
Flask-Redis
|
|
15
|
-
Flask-SQLAlchemy>=
|
|
16
|
+
Flask-SQLAlchemy>=3.1.1
|
|
16
17
|
geojson
|
|
17
18
|
redis>=4.0.2
|
|
18
|
-
connexion[swagger-ui]>=
|
|
19
|
-
Flask>=
|
|
19
|
+
connexion[swagger-ui]>=3.3.0
|
|
20
|
+
Flask>=3.1.2
|
|
20
21
|
Werkzeug>=0.15.5
|
|
21
22
|
yarl>=1.4.2
|
|
22
23
|
xlrd
|
|
@@ -7,7 +7,7 @@ def read(f):
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name='mwgencode',
|
|
10
|
-
version='1.
|
|
10
|
+
version='1.5.0',
|
|
11
11
|
author='cxhjet',
|
|
12
12
|
author_email='cxhjet@qq.com',
|
|
13
13
|
description="根据starUML文档产生flask专案的代码",
|
|
@@ -38,28 +38,30 @@ setup(
|
|
|
38
38
|
'Programming Language :: Python :: 3.9',
|
|
39
39
|
'Programming Language :: Python :: 3.10',
|
|
40
40
|
'Programming Language :: Python :: 3.11',
|
|
41
|
+
'Programming Language :: Python :: 3.12',
|
|
41
42
|
],
|
|
42
43
|
install_requires=[
|
|
43
44
|
'mwutils>=0.1.41',
|
|
44
45
|
'mwauth>=0.4.49',
|
|
45
|
-
'mwsdk>=0.3.
|
|
46
|
+
'mwsdk>=0.3.3',
|
|
46
47
|
'mwpermission>=0.1.26',
|
|
47
48
|
'mw-aiohttp-session>=0.1.13',
|
|
48
49
|
'mw-aiohttp-babel>=0.1.7',
|
|
49
50
|
'mw-aiohttp-security>=0.1.13',
|
|
50
|
-
'
|
|
51
|
+
'mwgencode-mcp>=0.1.4',
|
|
52
|
+
'SQLAlchemy>=2.0.44',
|
|
51
53
|
'pyJWT',
|
|
52
54
|
'python-consul',
|
|
53
55
|
'flask_migrate',
|
|
54
56
|
'flask-babel',
|
|
55
57
|
'Flask-Cors',
|
|
56
58
|
'Flask-Redis',
|
|
57
|
-
'Flask-SQLAlchemy>=
|
|
59
|
+
'Flask-SQLAlchemy>=3.1.1',
|
|
58
60
|
'geojson',
|
|
59
61
|
'redis>=4.0.2',
|
|
60
|
-
'connexion[swagger-ui]>=
|
|
62
|
+
'connexion[swagger-ui]>=3.3.0',
|
|
61
63
|
# 'pymssql==2.1.3'
|
|
62
|
-
'Flask>=
|
|
64
|
+
'Flask>=3.1.2',
|
|
63
65
|
'Werkzeug>=0.15.5',
|
|
64
66
|
'yarl>=1.4.2',
|
|
65
67
|
'xlrd',
|
|
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
|
|
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
|
|
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
|
|
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
|