kunapi 1.14__tar.gz → 1.16__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.16/PKG-INFO +30 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/__init__.py +1 -1
- {kunapi-1.14 → kunapi-1.16}/kunapi/common/autoload.py +13 -3
- {kunapi-1.14 → kunapi-1.16}/kunapi/kunapi.py +2 -1
- kunapi-1.16/kunapi.egg-info/PKG-INFO +30 -0
- kunapi-1.14/PKG-INFO +0 -13
- kunapi-1.14/kunapi.egg-info/PKG-INFO +0 -13
- {kunapi-1.14 → kunapi-1.16}/kunapi/Events.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/app.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/common/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/common/globals.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/common/request.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/config/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/common/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/common/autoload.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/common/model.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/config/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/config/app.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/common/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/common/autoload.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/index.py +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi.egg-info/SOURCES.txt +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi.egg-info/dependency_links.txt +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi.egg-info/entry_points.txt +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi.egg-info/requires.txt +0 -0
- {kunapi-1.14 → kunapi-1.16}/kunapi.egg-info/top_level.txt +0 -0
- {kunapi-1.14 → kunapi-1.16}/setup.cfg +0 -0
- {kunapi-1.14 → kunapi-1.16}/setup.py +0 -0
kunapi-1.16/PKG-INFO
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kunapi
|
|
3
|
+
Version: 1.16
|
|
4
|
+
Summary: kunapi
|
|
5
|
+
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
|
+
Author: 百里-坤坤
|
|
7
|
+
Author-email: fengkun01@qq.com
|
|
8
|
+
Maintainer: 坤坤
|
|
9
|
+
Maintainer-email: fengkun01@qq.com
|
|
10
|
+
License: MIT License
|
|
11
|
+
Keywords: kunapi1.16
|
|
12
|
+
Requires-Dist: gunicorn==20.0.4
|
|
13
|
+
Requires-Dist: waitress==3.0.0
|
|
14
|
+
Requires-Dist: watchdog==4.0.0
|
|
15
|
+
Requires-Dist: filetype==1.2.0
|
|
16
|
+
Requires-Dist: psutil==5.9.4
|
|
17
|
+
Requires-Dist: requests==2.32.4
|
|
18
|
+
Requires-Dist: python-daemon==3.1.2
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: author-email
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: keywords
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: maintainer
|
|
26
|
+
Dynamic: maintainer-email
|
|
27
|
+
Dynamic: requires-dist
|
|
28
|
+
Dynamic: summary
|
|
29
|
+
|
|
30
|
+
kunapi
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
import time,
|
|
2
|
+
import time,json,re,os,platform,shutil,requests,importlib,traceback,tarfile,psutil,random
|
|
3
3
|
from kunapi import config
|
|
4
4
|
from . import globals
|
|
5
5
|
import subprocess
|
|
@@ -139,6 +139,7 @@ def md5(strs):
|
|
|
139
139
|
|
|
140
140
|
return String类型
|
|
141
141
|
"""
|
|
142
|
+
import hashlib
|
|
142
143
|
m = hashlib.md5()
|
|
143
144
|
b = strs.encode(encoding='utf-8')
|
|
144
145
|
m.update(b)
|
|
@@ -191,7 +192,8 @@ def get_pid_info(pid,types='pid'):
|
|
|
191
192
|
types info表示获取进程信息 否则判断进程号是否存在
|
|
192
193
|
"""
|
|
193
194
|
if pid:
|
|
194
|
-
pid=int(pid)
|
|
195
|
+
try:pid=int(pid)
|
|
196
|
+
except:return False
|
|
195
197
|
try:
|
|
196
198
|
if types=='info':
|
|
197
199
|
p = psutil.Process(pid)
|
|
@@ -234,6 +236,7 @@ def kill_pid(pid,retry=60):
|
|
|
234
236
|
pid 进程号
|
|
235
237
|
"""
|
|
236
238
|
if pid:
|
|
239
|
+
import signal
|
|
237
240
|
for i in range(retry):
|
|
238
241
|
if 'Linux' in get_sysinfo()['platform']:
|
|
239
242
|
# os.system("kill -9 "+str(pid))
|
|
@@ -323,6 +326,7 @@ class kcwszip:
|
|
|
323
326
|
return filename
|
|
324
327
|
def packzip(src,dst):
|
|
325
328
|
"压缩"
|
|
329
|
+
import zipfile
|
|
326
330
|
filelist = []
|
|
327
331
|
if os.path.isfile(src):
|
|
328
332
|
filelist.append(src)
|
|
@@ -336,6 +340,7 @@ class kcwszip:
|
|
|
336
340
|
zf.close()
|
|
337
341
|
def unzip_file(dst, src,all=True):
|
|
338
342
|
"解压"
|
|
343
|
+
import zipfile
|
|
339
344
|
if all:
|
|
340
345
|
zf = zipfile.ZipFile(dst)
|
|
341
346
|
zf.extractall(src)
|
|
@@ -347,6 +352,7 @@ class kcwszip:
|
|
|
347
352
|
zip_ref.close()
|
|
348
353
|
def unzip(filename):
|
|
349
354
|
"解压到文件所在目录"
|
|
355
|
+
import zipfile
|
|
350
356
|
diswjj=''
|
|
351
357
|
tarr=filename.split('.')
|
|
352
358
|
i=0
|
|
@@ -649,7 +655,7 @@ class create:
|
|
|
649
655
|
|
|
650
656
|
plug 插件名
|
|
651
657
|
"""
|
|
652
|
-
import pip
|
|
658
|
+
import pip,zipfile
|
|
653
659
|
plug=str(plug)
|
|
654
660
|
if os.path.exists(self.project+self.appname+"/"+self.modular+"/controller/"+plug) and not mandatory:
|
|
655
661
|
return False,"该插件已存在"
|
|
@@ -718,6 +724,8 @@ class create:
|
|
|
718
724
|
if len(install_requires):
|
|
719
725
|
try:
|
|
720
726
|
install_requires.insert(0,"install")
|
|
727
|
+
install_requires.append('-i')
|
|
728
|
+
install_requires.append('https://mirrors.aliyun.com/pypi/simple/')
|
|
721
729
|
if 0 != pip.main(install_requires):
|
|
722
730
|
shutil.rmtree(self.project+self.appname+"/"+self.modular+"/controller/"+plug)
|
|
723
731
|
return False,"依赖包安装错误"
|
|
@@ -914,6 +922,8 @@ class create:
|
|
|
914
922
|
if len(install_requires):
|
|
915
923
|
try:
|
|
916
924
|
install_requires.insert(0,"install")
|
|
925
|
+
install_requires.append('-i')
|
|
926
|
+
install_requires.append('https://mirrors.aliyun.com/pypi/simple/')
|
|
917
927
|
if 0 != pip.main(install_requires):
|
|
918
928
|
shutil.rmtree(self.project+self.appname+"/"+self.modular)
|
|
919
929
|
return False,"模块依赖包安装错误"
|
|
@@ -358,7 +358,6 @@ def cllfunction():
|
|
|
358
358
|
else:
|
|
359
359
|
save_route_cli_pid('pid/'+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+'_server_pid')
|
|
360
360
|
from gunicorn.app.wsgiapp import run
|
|
361
|
-
import re
|
|
362
361
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$','',sys.argv[0])
|
|
363
362
|
sys.argv=[sys.argv[0], '-w', str(cmd_par['processcount']), '-b', cmd_par['host']+':'+str(cmd_par['port']),'-t',cmd_par['timeout'], 'server:'+cmd_par['appname']]
|
|
364
363
|
if cmd_par['daemonyun']:
|
|
@@ -474,6 +473,7 @@ def cllfunction():
|
|
|
474
473
|
elif cmd_par['cmd']:
|
|
475
474
|
pass
|
|
476
475
|
elif cmd_par['cli']:#通过命令行执行控制器的方法
|
|
476
|
+
config.app['cli']=True
|
|
477
477
|
try:
|
|
478
478
|
obj=importlib.import_module(cmd_par['appname']+'.common')
|
|
479
479
|
if obj.config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr!=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1:
|
|
@@ -512,6 +512,7 @@ def cllfunction():
|
|
|
512
512
|
else:
|
|
513
513
|
app.cli(RAW_URI)
|
|
514
514
|
else:#通过命令行执行控制器的方法
|
|
515
|
+
config.app['cli']=True
|
|
515
516
|
try:
|
|
516
517
|
obj=importlib.import_module(cmd_par['appname']+'.common')
|
|
517
518
|
if obj.config.fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr!=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1:
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kunapi
|
|
3
|
+
Version: 1.16
|
|
4
|
+
Summary: kunapi
|
|
5
|
+
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
|
+
Author: 百里-坤坤
|
|
7
|
+
Author-email: fengkun01@qq.com
|
|
8
|
+
Maintainer: 坤坤
|
|
9
|
+
Maintainer-email: fengkun01@qq.com
|
|
10
|
+
License: MIT License
|
|
11
|
+
Keywords: kunapi1.16
|
|
12
|
+
Requires-Dist: gunicorn==20.0.4
|
|
13
|
+
Requires-Dist: waitress==3.0.0
|
|
14
|
+
Requires-Dist: watchdog==4.0.0
|
|
15
|
+
Requires-Dist: filetype==1.2.0
|
|
16
|
+
Requires-Dist: psutil==5.9.4
|
|
17
|
+
Requires-Dist: requests==2.32.4
|
|
18
|
+
Requires-Dist: python-daemon==3.1.2
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: author-email
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: keywords
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: maintainer
|
|
26
|
+
Dynamic: maintainer-email
|
|
27
|
+
Dynamic: requires-dist
|
|
28
|
+
Dynamic: summary
|
|
29
|
+
|
|
30
|
+
kunapi
|
kunapi-1.14/PKG-INFO
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: kunapi
|
|
3
|
-
Version: 1.14
|
|
4
|
-
Summary: kunapi
|
|
5
|
-
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
|
-
Author: 百里-坤坤
|
|
7
|
-
Author-email: fengkun01@qq.com
|
|
8
|
-
Maintainer: 坤坤
|
|
9
|
-
Maintainer-email: fengkun01@qq.com
|
|
10
|
-
License: MIT License
|
|
11
|
-
Keywords: kunapi1.14
|
|
12
|
-
|
|
13
|
-
kunapi
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: kunapi
|
|
3
|
-
Version: 1.14
|
|
4
|
-
Summary: kunapi
|
|
5
|
-
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
|
-
Author: 百里-坤坤
|
|
7
|
-
Author-email: fengkun01@qq.com
|
|
8
|
-
Maintainer: 坤坤
|
|
9
|
-
Maintainer-email: fengkun01@qq.com
|
|
10
|
-
License: MIT License
|
|
11
|
-
Keywords: kunapi1.14
|
|
12
|
-
|
|
13
|
-
kunapi
|
|
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.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py
RENAMED
|
File without changes
|
{kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py
RENAMED
|
File without changes
|
{kunapi-1.14 → kunapi-1.16}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.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
|