kunapi 1.8__tar.gz → 1.10__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.
Files changed (33) hide show
  1. {kunapi-1.8 → kunapi-1.10}/PKG-INFO +2 -2
  2. {kunapi-1.8 → kunapi-1.10}/kunapi/__init__.py +1 -1
  3. {kunapi-1.8 → kunapi-1.10}/kunapi/common/request.py +6 -3
  4. {kunapi-1.8 → kunapi-1.10}/kunapi/kunapi.py +31 -5
  5. {kunapi-1.8 → kunapi-1.10}/kunapi.egg-info/PKG-INFO +2 -2
  6. {kunapi-1.8 → kunapi-1.10}/kunapi.egg-info/SOURCES.txt +0 -20
  7. {kunapi-1.8 → kunapi-1.10}/setup.py +4 -1
  8. {kunapi-1.8 → kunapi-1.10}/kunapi/Events.py +0 -0
  9. {kunapi-1.8 → kunapi-1.10}/kunapi/app.py +0 -0
  10. {kunapi-1.8 → kunapi-1.10}/kunapi/common/__init__.py +0 -0
  11. {kunapi-1.8 → kunapi-1.10}/kunapi/common/autoload.py +0 -0
  12. {kunapi-1.8 → kunapi-1.10}/kunapi/common/globals.py +0 -0
  13. {kunapi-1.8 → kunapi-1.10}/kunapi/config/__init__.py +0 -0
  14. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/__init__.py +0 -0
  15. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/common/__init__.py +0 -0
  16. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/common/autoload.py +0 -0
  17. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/common/model.py +0 -0
  18. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/config/__init__.py +0 -0
  19. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/config/app.py +0 -0
  20. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/__init__.py +0 -0
  21. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/common/__init__.py +0 -0
  22. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/common/autoload.py +0 -0
  23. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/controller/__init__.py +0 -0
  24. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/controller/index/__init__.py +0 -0
  25. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py +0 -0
  26. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py +0 -0
  27. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.py +0 -0
  28. {kunapi-1.8 → kunapi-1.10}/kunapi/tempfile/kunapi/app/index/controller/index/index.py +0 -0
  29. {kunapi-1.8 → kunapi-1.10}/kunapi.egg-info/dependency_links.txt +0 -0
  30. {kunapi-1.8 → kunapi-1.10}/kunapi.egg-info/entry_points.txt +0 -0
  31. {kunapi-1.8 → kunapi-1.10}/kunapi.egg-info/requires.txt +0 -0
  32. {kunapi-1.8 → kunapi-1.10}/kunapi.egg-info/top_level.txt +0 -0
  33. {kunapi-1.8 → kunapi-1.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kunapi
3
- Version: 1.8
3
+ Version: 1.10
4
4
  Summary: kunapi
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -8,6 +8,6 @@ Author-email: fengkun01@qq.com
8
8
  Maintainer: 坤坤
9
9
  Maintainer-email: fengkun01@qq.com
10
10
  License: MIT License
11
- Keywords: kunapi1.8
11
+ Keywords: kunapi1.10
12
12
 
13
13
  kunapi
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = '1.8'
2
+ __version__ = '1.10'
3
3
  try:
4
4
  from .app import web
5
5
  except:pass
@@ -113,9 +113,12 @@ class HEADER:
113
113
  def SERVER_PROTOCOL():
114
114
  return kcwsglobals.HEADER.SERVER_PROTOCOL
115
115
  def HTTP_HOST():
116
- if kcwsglobals.HEADER.HTTP_HOST:
117
- return kcwsglobals.HEADER.HTTP_HOST
118
- else:
116
+ try:
117
+ if kcwsglobals.HEADER.HTTP_HOST:
118
+ return kcwsglobals.HEADER.HTTP_HOST
119
+ else:
120
+ return ''
121
+ except:
119
122
  return ''
120
123
  def HTTP_COOKIE():
121
124
  return kcwsglobals.HEADER.HTTP_COOKIE
@@ -7,16 +7,16 @@ def get_cmd_par(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=''):
7
7
  global fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1
8
8
  if fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr:
9
9
  fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1=fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr
10
- python_version=platform.python_version()
10
+ # python_version=platform.python_version()
11
11
  # if python_version[0:3]!='3.8':
12
12
  # print("\033[1;31;40m "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"依赖python3.8,与你现在的python"+python_version+"不兼容")
13
13
  # exit()
14
14
  if 'Linux' in get_sysinfo()['platform'] or 'Windows' in get_sysinfo()['platform']:pass
15
15
  else:
16
- print("\033[1;31;40m "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"不支持当前操作系统 解压在linux或windows系统下运行")
16
+ print("\033[1;31;40m "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"不支持当前操作系统 linux或windows系统下运行")
17
17
  exit()
18
18
  try:
19
- opts, args = getopt.getopt(sys.argv[1:], "h", ["project=","app=","modular=","plug=","user=","pwd=","host=","port=","timeout=","processcount=",
19
+ opts, args = getopt.getopt(sys.argv[1:], "h", ["project=","app=","modular=","plug=","user=","pwd=","host=","port=","timeout=","processcount=","cmd=","path=",
20
20
  "install","uninstall","pack","upload","cli"])
21
21
  # print("opts",opts)
22
22
  # print("args",args)
@@ -42,6 +42,8 @@ def get_cmd_par(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=''):
42
42
  port=39001
43
43
  timeout='600'
44
44
  processcount='4'
45
+ cmd=''
46
+ path=''
45
47
 
46
48
  install=False
47
49
  uninstall=False
@@ -73,6 +75,15 @@ def get_cmd_par(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=''):
73
75
  timeout=data[1]
74
76
  elif '--processcount' == data[0]:
75
77
  processcount=data[1]
78
+ elif '--cmd' == data[0]:
79
+ cmd=data[1]
80
+ # print('cmd',cmd)
81
+ elif '--path' == data[0]:
82
+ # print('path',data[1])
83
+ if data[1]:
84
+ path=data[1]
85
+ print('已切换工作目录',path)
86
+ os.chdir(path)
76
87
 
77
88
  elif '--help' == data[0]:
78
89
  help=True
@@ -105,13 +116,15 @@ def get_cmd_par(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=''):
105
116
  print("\033[1;31;40m有关"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"命令的详细信息,请键入 "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" help",e)
106
117
  return False
107
118
  else:
108
- return {
119
+ seawew={
109
120
  'server':server,
110
121
  'update':update,
111
122
  'project':project,'appname':appname,'modular':modular,'username':username,'password':password,'plug':plug,'host':host,'port':port,'timeout':timeout,'processcount':processcount,
112
- 'help':help,'install':install,'uninstall':uninstall,'pack':pack,'upload':upload,'cli':cli,
123
+ 'help':help,'install':install,'uninstall':uninstall,'pack':pack,'upload':upload,'cli':cli,'cmd':cmd,'path':path,
113
124
  'index':i
114
125
  }
126
+ # print('seawew',seawew)
127
+ return seawew
115
128
  def temp_get_file(folder='./',lists=[]):
116
129
  lis=os.listdir(folder)
117
130
  for files in lis:
@@ -388,6 +401,19 @@ def cllfunction():
388
401
  else:
389
402
  print("\033[1;31;40m卸载时 必须指定应该app和modular,参考命令: "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" --app app --modular api")
390
403
  exit()
404
+ elif cmd_par['cmd']:
405
+
406
+ if '&&' in cmd_par['cmd']:
407
+ for cmds in cmd_par['cmd'].split('&&'):
408
+ print('执行命令',cmds)
409
+ os.system(cmds)
410
+ elif '||' in cmd_par['cmd']:
411
+ for cmds in cmd_par['cmd'].split('||'):
412
+ print('执行命令',cmds)
413
+ os.system(cmds)
414
+ else:
415
+ print('执行命令',cmd_par['cmd'])
416
+ os.system(cmd_par['cmd'])
391
417
  elif cmd_par['cli']:#通过命令行执行控制器的方法
392
418
  try:
393
419
  obj=importlib.import_module(cmd_par['appname']+'.common')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kunapi
3
- Version: 1.8
3
+ Version: 1.10
4
4
  Summary: kunapi
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -8,6 +8,6 @@ Author-email: fengkun01@qq.com
8
8
  Maintainer: 坤坤
9
9
  Maintainer-email: fengkun01@qq.com
10
10
  License: MIT License
11
- Keywords: kunapi1.8
11
+ Keywords: kunapi1.10
12
12
 
13
13
  kunapi
@@ -28,24 +28,4 @@ kunapi/tempfile/kunapi/app/index/controller/index/__init__.py
28
28
  kunapi/tempfile/kunapi/app/index/controller/index/index.py
29
29
  kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py
30
30
  kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py
31
- kunapi/tempfile/kunapi/app/index/controller/index/common/model.py
32
- kunapi/common/__init__.py
33
- kunapi/common/autoload.py
34
- kunapi/common/globals.py
35
- kunapi/common/request.py
36
- kunapi/config/__init__.py
37
- kunapi/tempfile/kunapi/app/__init__.py
38
- kunapi/tempfile/kunapi/app/common/__init__.py
39
- kunapi/tempfile/kunapi/app/common/autoload.py
40
- kunapi/tempfile/kunapi/app/common/model.py
41
- kunapi/tempfile/kunapi/app/config/__init__.py
42
- kunapi/tempfile/kunapi/app/config/app.py
43
- kunapi/tempfile/kunapi/app/index/__init__.py
44
- kunapi/tempfile/kunapi/app/index/common/__init__.py
45
- kunapi/tempfile/kunapi/app/index/common/autoload.py
46
- kunapi/tempfile/kunapi/app/index/controller/__init__.py
47
- kunapi/tempfile/kunapi/app/index/controller/index/__init__.py
48
- kunapi/tempfile/kunapi/app/index/controller/index/index.py
49
- kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py
50
- kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py
51
31
  kunapi/tempfile/kunapi/app/index/controller/index/common/model.py
@@ -1,5 +1,8 @@
1
1
 
2
- # 打包上传 python setup.py sdist upload
2
+ # 打包 python setup.py sdist
3
+ # 上传 twine upload dist/*
4
+
5
+
3
6
  # 安装 python setup.py install
4
7
  import os,sys
5
8
  from setuptools import setup
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes