kunapi 1.1__tar.gz → 1.3__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.
- {kunapi-1.1 → kunapi-1.3}/PKG-INFO +2 -2
- {kunapi-1.1 → kunapi-1.3}/kunapi/__init__.py +1 -1
- {kunapi-1.1 → kunapi-1.3}/kunapi/app.py +3 -3
- {kunapi-1.1 → kunapi-1.3}/kunapi/kunapi.py +59 -30
- {kunapi-1.1 → kunapi-1.3}/kunapi.egg-info/PKG-INFO +2 -2
- {kunapi-1.1 → kunapi-1.3}/kunapi/Events.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/common/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/common/autoload.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/common/globals.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/common/request.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/config/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/common/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/common/autoload.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/common/model.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/config/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/config/app.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/common/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/common/autoload.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/index.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/server.py +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi.egg-info/SOURCES.txt +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi.egg-info/dependency_links.txt +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi.egg-info/entry_points.txt +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi.egg-info/requires.txt +0 -0
- {kunapi-1.1 → kunapi-1.3}/kunapi.egg-info/top_level.txt +0 -0
- {kunapi-1.1 → kunapi-1.3}/setup.cfg +0 -0
- {kunapi-1.1 → kunapi-1.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.2
|
|
2
2
|
Name: kunapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3
|
|
4
4
|
Summary: kunapi
|
|
5
5
|
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
6
|
Author: 百里-坤坤
|
|
@@ -9,5 +9,5 @@ Maintainer: 坤坤
|
|
|
9
9
|
Maintainer-email: fengkun01@qq.com
|
|
10
10
|
License: MIT License
|
|
11
11
|
Description: kunapi
|
|
12
|
-
Keywords: kunapi1.
|
|
12
|
+
Keywords: kunapi1.3
|
|
13
13
|
Platform: UNKNOWN
|
|
@@ -99,6 +99,7 @@ class web:
|
|
|
99
99
|
# self.__port=port
|
|
100
100
|
import sys
|
|
101
101
|
cmd=sys.argv
|
|
102
|
+
# print('cmd',cmd)
|
|
102
103
|
config.app['cli']=False
|
|
103
104
|
if 'eventlog' in cmd or len(cmd)==1 or (len(cmd)>=2 and cmd[len(cmd)-1]=='server'):
|
|
104
105
|
# config.app['cli']=False
|
|
@@ -125,9 +126,9 @@ class web:
|
|
|
125
126
|
Events(cmd)
|
|
126
127
|
else:
|
|
127
128
|
self.__impl(host=host,port=port,filename=filename)
|
|
128
|
-
elif len(
|
|
129
|
+
elif len(cmd)==3 and cmd[2]=='--cli':
|
|
129
130
|
try:
|
|
130
|
-
RAW_URI=
|
|
131
|
+
RAW_URI=cmd[1]
|
|
131
132
|
except:pass
|
|
132
133
|
else:
|
|
133
134
|
self.cli(RAW_URI)
|
|
@@ -161,7 +162,6 @@ class web:
|
|
|
161
162
|
status,resheader,body=self.__routes(reqheader)
|
|
162
163
|
print(body)
|
|
163
164
|
if(config.app['save_cli_pid']) and pid:
|
|
164
|
-
|
|
165
165
|
try:
|
|
166
166
|
os.remove(clipidpath)
|
|
167
167
|
except:pass
|
|
@@ -164,35 +164,36 @@ def cllfunction():
|
|
|
164
164
|
print("\033[32m"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" --modular api --uninstall 卸载app/api模块")
|
|
165
165
|
print("\033[32m"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" --modular api --plug plug1 --uninstall 卸载app/api/plug1插件\n")
|
|
166
166
|
else:
|
|
167
|
-
if cmd_par['cli']:#通过命令行执行控制器的方法
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
167
|
+
# if cmd_par['cli']:#通过命令行执行控制器的方法
|
|
168
|
+
# try:
|
|
169
|
+
# obj=importlib.import_module(cmd_par['appname']+'.common')
|
|
170
|
+
# if obj.config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr!=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1:
|
|
171
|
+
# print("该项目只能使用"+obj.config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr+"开头的命令!")
|
|
172
|
+
# exit()
|
|
173
|
+
# except Exception as e:
|
|
174
|
+
# print('项目不合法',traceback.format_exc())
|
|
175
|
+
# exit()
|
|
176
|
+
# config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1
|
|
177
|
+
# from kunapi import web
|
|
178
|
+
# try:
|
|
179
|
+
# import app as application
|
|
180
|
+
# except Exception as e:
|
|
181
|
+
# if "No module named 'app'" in str(e):
|
|
182
|
+
# print("请在"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"项目下运行")
|
|
183
|
+
# else:
|
|
184
|
+
# print(traceback.format_exc())
|
|
185
|
+
# exit()
|
|
186
|
+
# else:
|
|
187
|
+
# app=web(__name__,application)
|
|
188
|
+
# try:
|
|
189
|
+
# RAW_URI=sys.argv[1]
|
|
190
|
+
# except:pass
|
|
191
|
+
# else:
|
|
192
|
+
# if RAW_URI=='--cli':
|
|
193
|
+
# RAW_URI=''
|
|
194
|
+
# app.cli(RAW_URI)
|
|
195
|
+
|
|
196
|
+
if cmd_par['update']:#更新kunapi包:
|
|
196
197
|
# print(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1)
|
|
197
198
|
# exit()
|
|
198
199
|
serall=['kunapi','kwebs','kwebsp']
|
|
@@ -319,7 +320,7 @@ def cllfunction():
|
|
|
319
320
|
else:
|
|
320
321
|
save_route_cli_pid('pid/'+str(sys.argv[tar-1])+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+'_server_pid')
|
|
321
322
|
app.run(host=cmd_par['host'],port=int(cmd_par['port']))
|
|
322
|
-
|
|
323
|
+
elif cmd_par['install'] or cmd_par['pack'] or cmd_par['upload'] or cmd_par['uninstall']:
|
|
323
324
|
if cmd_par['install']:#插入 应用、模块、插件
|
|
324
325
|
if cmd_par['appname'] and cmd_par['modular']:
|
|
325
326
|
if os.path.exists(cmd_par['appname']):
|
|
@@ -420,6 +421,34 @@ def cllfunction():
|
|
|
420
421
|
else:
|
|
421
422
|
print("\033[1;31;40m卸载时 必须指定应该app和modular,参考命令: "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" --app app --modular api")
|
|
422
423
|
exit()
|
|
424
|
+
else:
|
|
425
|
+
try:
|
|
426
|
+
obj=importlib.import_module(cmd_par['appname']+'.common')
|
|
427
|
+
if obj.config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr!=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1:
|
|
428
|
+
print("该项目只能使用"+obj.config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr+"开头的命令!")
|
|
429
|
+
exit()
|
|
430
|
+
except Exception as e:
|
|
431
|
+
print('项目不合法',traceback.format_exc())
|
|
432
|
+
exit()
|
|
433
|
+
config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1
|
|
434
|
+
from kunapi import web
|
|
435
|
+
try:
|
|
436
|
+
import app as application
|
|
437
|
+
except Exception as e:
|
|
438
|
+
if "No module named 'app'" in str(e):
|
|
439
|
+
print("请在"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"项目下运行")
|
|
440
|
+
else:
|
|
441
|
+
print(traceback.format_exc())
|
|
442
|
+
exit()
|
|
443
|
+
else:
|
|
444
|
+
app=web(__name__,application)
|
|
445
|
+
try:
|
|
446
|
+
RAW_URI=sys.argv[1]
|
|
447
|
+
except:pass
|
|
448
|
+
else:
|
|
449
|
+
if RAW_URI=='--cli':
|
|
450
|
+
RAW_URI=''
|
|
451
|
+
app.cli(RAW_URI)
|
|
423
452
|
def cill_start(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr='kunapi'):
|
|
424
453
|
"脚本入口"
|
|
425
454
|
global fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.2
|
|
2
2
|
Name: kunapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3
|
|
4
4
|
Summary: kunapi
|
|
5
5
|
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
6
|
Author: 百里-坤坤
|
|
@@ -9,5 +9,5 @@ Maintainer: 坤坤
|
|
|
9
9
|
Maintainer-email: fengkun01@qq.com
|
|
10
10
|
License: MIT License
|
|
11
11
|
Description: kunapi
|
|
12
|
-
Keywords: kunapi1.
|
|
12
|
+
Keywords: kunapi1.3
|
|
13
13
|
Platform: UNKNOWN
|
|
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
|
{kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py
RENAMED
|
File without changes
|
{kunapi-1.1 → kunapi-1.3}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py
RENAMED
|
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
|