kunapi 1.4__tar.gz → 1.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.
- {kunapi-1.4 → kunapi-1.5}/PKG-INFO +2 -2
- {kunapi-1.4 → kunapi-1.5}/kunapi/Events.py +1 -5
- {kunapi-1.4 → kunapi-1.5}/kunapi/__init__.py +1 -1
- {kunapi-1.4 → kunapi-1.5}/kunapi/common/autoload.py +0 -68
- {kunapi-1.4 → kunapi-1.5}/kunapi/kunapi.py +6 -17
- {kunapi-1.4 → kunapi-1.5}/kunapi.egg-info/PKG-INFO +2 -2
- {kunapi-1.4 → kunapi-1.5}/kunapi.egg-info/SOURCES.txt +0 -24
- kunapi-1.4/kunapi/tempfile/kunapi/app/__init__.py +0 -3
- kunapi-1.4/kunapi/tempfile/kunapi/server.py +0 -13
- {kunapi-1.4 → kunapi-1.5}/kunapi/app.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/common/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/common/globals.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/common/request.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/config/__init__.py +0 -0
- {kunapi-1.4/kunapi/tempfile → kunapi-1.5/kunapi/tempfile/kunapi/app}/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/common/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/common/autoload.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/common/model.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/config/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/config/app.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/common/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/common/autoload.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/index/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/index/index.py +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi.egg-info/dependency_links.txt +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi.egg-info/entry_points.txt +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi.egg-info/requires.txt +0 -0
- {kunapi-1.4 → kunapi-1.5}/kunapi.egg-info/top_level.txt +0 -0
- {kunapi-1.4 → kunapi-1.5}/setup.cfg +0 -0
- {kunapi-1.4 → kunapi-1.5}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.2
|
|
2
2
|
Name: kunapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5
|
|
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.5
|
|
13
13
|
Platform: UNKNOWN
|
|
@@ -834,58 +834,6 @@ class create:
|
|
|
834
834
|
import pip
|
|
835
835
|
if not os.path.exists(self.project+self.appname):
|
|
836
836
|
raise Exception('项目不存在')
|
|
837
|
-
# if config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=='kwebsp':
|
|
838
|
-
# r=requests.get(config.domain['kcwebsfile']+"/kunapi/kwebsp.zip")
|
|
839
|
-
# f = open("./"+self.project+"k.zip", "wb")
|
|
840
|
-
# for chunk in r.iter_content(chunk_size=512):
|
|
841
|
-
# if chunk:
|
|
842
|
-
# f.write(chunk)
|
|
843
|
-
# f.close()
|
|
844
|
-
# kcwszip.unzip_file("./"+self.project+"kwebsp.zip","./"+self.project+self.appname)
|
|
845
|
-
# os.remove("./"+self.project+"kwebsp.zip")
|
|
846
|
-
# elif config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=='kwebs':
|
|
847
|
-
# r=requests.get(config.domain['kcwebsfile']+"/kunapi/kwebs.zip")
|
|
848
|
-
# f = open("./"+self.project+"kwebs.zip", "wb")
|
|
849
|
-
# for chunk in r.iter_content(chunk_size=512):
|
|
850
|
-
# if chunk:
|
|
851
|
-
# f.write(chunk)
|
|
852
|
-
# f.close()
|
|
853
|
-
# kcwszip.unzip_file("./"+self.project+"kwebs.zip","./"+self.project+self.appname)
|
|
854
|
-
# os.remove("./"+self.project+"kwebs.zip")
|
|
855
|
-
# elif config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=='kunapi':
|
|
856
|
-
# r=requests.get(config.domain['kcwebsfile']+"/kapi/kapi.zip")
|
|
857
|
-
# f = open("./"+self.project+"kapi.zip", "wb")
|
|
858
|
-
# for chunk in r.iter_content(chunk_size=512):
|
|
859
|
-
# if chunk:
|
|
860
|
-
# f.write(chunk)
|
|
861
|
-
# f.close()
|
|
862
|
-
# kcwszip.unzip_file("./"+self.project+"kapi.zip","./"+self.project+self.appname)
|
|
863
|
-
# os.remove("./"+self.project+"kapi.zip")
|
|
864
|
-
# else:
|
|
865
|
-
# raise Exception('包名错误')
|
|
866
|
-
# if not os.path.isfile("./"+self.project+"server.py"):
|
|
867
|
-
# # if "Windows" in platform.platform():
|
|
868
|
-
# # pythonname="python"
|
|
869
|
-
# # else:
|
|
870
|
-
# # pythonname="python3.8"
|
|
871
|
-
# servertext=('#项目运行文件,请务修改\n'+
|
|
872
|
-
# 'import kunapi,sys,'+self.appname+'\n'+
|
|
873
|
-
# 'app=kunapi.web(__name__,'+self.appname+')\n'+
|
|
874
|
-
# 'if __name__ == "__main__":\n'+
|
|
875
|
-
# ' try:\n'+
|
|
876
|
-
# ' route=sys.argv[1]\n'+
|
|
877
|
-
# ' if "eventlog"==route:\n'+
|
|
878
|
-
# ' raise Exception("")\n'+
|
|
879
|
-
# ' except:\n'+
|
|
880
|
-
# ' #host监听ip port端口 name python解释器名字 (windows一般是python linux一般是python3) \n'+
|
|
881
|
-
# ' app.run(host="0.0.0.0",port="39001",name="python3.8")\n'+
|
|
882
|
-
# ' else:\n'+
|
|
883
|
-
# ' app.cli(route)\n'
|
|
884
|
-
# )
|
|
885
|
-
# f=open("./"+self.project+"server.py","w+",encoding='utf-8')
|
|
886
|
-
# f.write(servertext)
|
|
887
|
-
# f.close()
|
|
888
|
-
# return True,"应用创建成功"
|
|
889
837
|
else:
|
|
890
838
|
if not os.path.isfile(self.project+self.appname+"/__init__.py") or not os.path.exists(self.project+self.appname+"/common"):
|
|
891
839
|
return False,self.appname+"不是kunapi应用"
|
|
@@ -1010,22 +958,6 @@ class create:
|
|
|
1010
958
|
f.close()
|
|
1011
959
|
else:
|
|
1012
960
|
return False,self.modular+"模块下载失败"
|
|
1013
|
-
if not os.path.isfile("./server.py"):
|
|
1014
|
-
if "Windows" in platform.platform():
|
|
1015
|
-
pythonname="python"
|
|
1016
|
-
else:
|
|
1017
|
-
pythonname="python3"
|
|
1018
|
-
# sys.argv[0]=re.sub('.py','',sys.argv[0])
|
|
1019
|
-
servertext=('# -*- coding: utf-8 -*-\n#gunicorn -b 0.0.0.0:39010 '+self.appname+':app\n'+
|
|
1020
|
-
'from kunapi import web\n'+
|
|
1021
|
-
'import '+self.appname+' as application\n'+
|
|
1022
|
-
'app=web(__name__,application)\n'+
|
|
1023
|
-
'if __name__ == "__main__":\n'+
|
|
1024
|
-
' #host监听ip port端口 name python解释器名字 (windows一般是python linux一般是python3)\n'+
|
|
1025
|
-
' app.run(host="0.0.0.0",port="39001",name="'+pythonname+'")')
|
|
1026
|
-
f=open("./"+self.project+"server.py","w+",encoding='utf-8')
|
|
1027
|
-
f.write(servertext)
|
|
1028
|
-
f.close()
|
|
1029
961
|
return True,"安装成功"
|
|
1030
962
|
else:
|
|
1031
963
|
|
|
@@ -236,7 +236,7 @@ def cllfunction():
|
|
|
236
236
|
exit()
|
|
237
237
|
config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1
|
|
238
238
|
types=sys.argv[len(sys.argv)-1]
|
|
239
|
-
if
|
|
239
|
+
if os.name == 'nt':
|
|
240
240
|
from kunapi import web
|
|
241
241
|
try:
|
|
242
242
|
import app as application
|
|
@@ -263,18 +263,7 @@ def cllfunction():
|
|
|
263
263
|
pythonpath=pythonpath.replace(tt,'')
|
|
264
264
|
if not os.path.exists('/usr/bin/'+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1) and os.path.isfile(pythonpath+'/bin/'+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1):
|
|
265
265
|
os.system("ln -s "+pythonpath+"/bin/"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" /usr/bin/"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1)
|
|
266
|
-
|
|
267
|
-
# pass
|
|
268
|
-
# else:
|
|
269
|
-
# print("启动参数错误,支持 -start和-stop")
|
|
270
|
-
# exit()
|
|
271
|
-
# try:
|
|
272
|
-
# f=open("pid",'r')
|
|
273
|
-
# pid=f.read()
|
|
274
|
-
# f.close()
|
|
275
|
-
# if pid:
|
|
276
|
-
# os.system("kill "+pid)
|
|
277
|
-
# except:pass
|
|
266
|
+
|
|
278
267
|
if __name__ == 'kunapi.kunapi':
|
|
279
268
|
kill_route_cli('pid/'+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+'_server_pid')
|
|
280
269
|
try:
|
|
@@ -308,13 +297,13 @@ def cllfunction():
|
|
|
308
297
|
remppath=os.path.split(os.path.realpath(__file__))[0]
|
|
309
298
|
if not os.path.exists(cmd_par['project']+'/'+cmd_par['appname']) and not os.path.exists(cmd_par['appname']):
|
|
310
299
|
shutil.copytree(remppath+'/tempfile/kunapi',cmd_par['project'])
|
|
311
|
-
if
|
|
300
|
+
if os.name == 'nt':
|
|
312
301
|
try:
|
|
313
|
-
os.remove(cmd_par['project']+"/server.
|
|
302
|
+
os.remove(cmd_par['project']+"/server.sh")
|
|
314
303
|
except:pass
|
|
315
|
-
|
|
304
|
+
else:
|
|
316
305
|
try:
|
|
317
|
-
os.remove(cmd_par['project']+"/server.
|
|
306
|
+
os.remove(cmd_par['project']+"/server.bat")
|
|
318
307
|
except:pass
|
|
319
308
|
print('kunapi项目创建成功')
|
|
320
309
|
exit()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.2
|
|
2
2
|
Name: kunapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5
|
|
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.5
|
|
13
13
|
Platform: UNKNOWN
|
|
@@ -14,30 +14,6 @@ kunapi/common/autoload.py
|
|
|
14
14
|
kunapi/common/globals.py
|
|
15
15
|
kunapi/common/request.py
|
|
16
16
|
kunapi/config/__init__.py
|
|
17
|
-
kunapi/tempfile/__init__.py
|
|
18
|
-
kunapi/tempfile/kunapi/server.py
|
|
19
|
-
kunapi/tempfile/kunapi/app/__init__.py
|
|
20
|
-
kunapi/tempfile/kunapi/app/common/__init__.py
|
|
21
|
-
kunapi/tempfile/kunapi/app/common/autoload.py
|
|
22
|
-
kunapi/tempfile/kunapi/app/common/model.py
|
|
23
|
-
kunapi/tempfile/kunapi/app/config/__init__.py
|
|
24
|
-
kunapi/tempfile/kunapi/app/config/app.py
|
|
25
|
-
kunapi/tempfile/kunapi/app/index/__init__.py
|
|
26
|
-
kunapi/tempfile/kunapi/app/index/common/__init__.py
|
|
27
|
-
kunapi/tempfile/kunapi/app/index/common/autoload.py
|
|
28
|
-
kunapi/tempfile/kunapi/app/index/controller/__init__.py
|
|
29
|
-
kunapi/tempfile/kunapi/app/index/controller/index/__init__.py
|
|
30
|
-
kunapi/tempfile/kunapi/app/index/controller/index/index.py
|
|
31
|
-
kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py
|
|
32
|
-
kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py
|
|
33
|
-
kunapi/tempfile/kunapi/app/index/controller/index/common/model.py
|
|
34
|
-
kunapi/common/__init__.py
|
|
35
|
-
kunapi/common/autoload.py
|
|
36
|
-
kunapi/common/globals.py
|
|
37
|
-
kunapi/common/request.py
|
|
38
|
-
kunapi/config/__init__.py
|
|
39
|
-
kunapi/tempfile/__init__.py
|
|
40
|
-
kunapi/tempfile/kunapi/server.py
|
|
41
17
|
kunapi/tempfile/kunapi/app/__init__.py
|
|
42
18
|
kunapi/tempfile/kunapi/app/common/__init__.py
|
|
43
19
|
kunapi/tempfile/kunapi/app/common/autoload.py
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#项目运行文件,请务修改
|
|
2
|
-
import kunapi,sys,app
|
|
3
|
-
app=kunapi.web(__name__,app)
|
|
4
|
-
if __name__ == "__main__":
|
|
5
|
-
try:
|
|
6
|
-
route=sys.argv[1]
|
|
7
|
-
if "eventlog"==route:
|
|
8
|
-
raise Exception("")
|
|
9
|
-
except:
|
|
10
|
-
#host监听ip port端口 name python解释器名字 (windows一般是python linux一般是python3)
|
|
11
|
-
app.run(host="0.0.0.0",port="3000",name="python3.8")
|
|
12
|
-
else:
|
|
13
|
-
app.cli(route)
|
|
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.4 → kunapi-1.5}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py
RENAMED
|
File without changes
|
{kunapi-1.4 → kunapi-1.5}/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
|