kcwebs 1.86__tar.gz → 1.88__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.
- {kcwebs-1.86 → kcwebs-1.88}/PKG-INFO +2 -2
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/__init__.py +1 -1
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/common/autoload.py +12 -18
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/utill/db/mongodb.py +2 -1
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs.egg-info/PKG-INFO +2 -2
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs.egg-info/requires.txt +3 -3
- {kcwebs-1.86 → kcwebs-1.88}/setup.py +1 -1
- {kcwebs-1.86 → kcwebs-1.88}/README.md +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/common/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/common/session.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/config/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/kcwebs.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/common/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/common/autoload.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/common/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/common/autoload.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/common/html/include/static.html +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/common/model.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/index.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/tpl/index/home.html +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/tpl/index/index.html +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/common/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/common/autoload.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/common/html/include/static.html +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/common/model.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/config/__init__.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/config/app.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/config/database.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/config/other.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/config/redis.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/server.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/utill/db/model.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/utill/db/sqlite.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs/utill/queues.py +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs.egg-info/SOURCES.txt +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs.egg-info/dependency_links.txt +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs.egg-info/entry_points.txt +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/kcwebs.egg-info/top_level.txt +0 -0
- {kcwebs-1.86 → kcwebs-1.88}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.2
|
|
2
2
|
Name: kcwebs
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.88
|
|
4
4
|
Summary: kcwebs作为web开发而设计的高性能框架
|
|
5
5
|
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
6
|
Author: 百里-坤坤
|
|
@@ -9,5 +9,5 @@ Maintainer: 坤坤
|
|
|
9
9
|
Maintainer-email: fk1402936534@qq.com
|
|
10
10
|
License: MIT License
|
|
11
11
|
Description: kcwebs作为web开发而设计的高性能框架,采用全新的架构思想,注重易用性。遵循MIT开源许可协议发布,意味着个人和企业可以免费使用kcwebs,甚至允许把你基于kcwebs开发的应用开源或商业产品发布或销售。完整文档请访问:https://docs.kwebapp.cn/index/index/2
|
|
12
|
-
Keywords: kcwebs1.
|
|
12
|
+
Keywords: kcwebs1.88
|
|
13
13
|
Platform: UNKNOWN
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
from kcws.common import *
|
|
2
2
|
from .. import config
|
|
3
|
-
import random,urllib,asyncio,websockets,smtplib,datetime,chardet,copy
|
|
3
|
+
import random,urllib,asyncio,websockets,smtplib,datetime,chardet,copy
|
|
4
4
|
import kcwredis,kcwcache,kcwmysql
|
|
5
|
-
from email.mime.text import MIMEText
|
|
6
|
-
from email.utils import formataddr
|
|
7
|
-
from mako.template import Template as kcwsTemplate
|
|
8
|
-
from mako.lookup import TemplateLookup
|
|
9
5
|
from kcwebs.utill.db import sqlite as kcwssqlite
|
|
10
6
|
from kcwebs.utill.db import mongodb as kcwsmongodb
|
|
11
|
-
from dateutil.relativedelta import relativedelta
|
|
12
|
-
# from kcwebs.utill.http import Http
|
|
13
7
|
from kcwhttp.httpclass import Http
|
|
14
8
|
from kcwebs.utill.queues import Queues
|
|
15
9
|
from kcwebs.utill.db import model
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
10
|
redisobj=kcwredis.redis
|
|
21
11
|
python_version=platform.python_version()
|
|
22
12
|
if python_version[0:3]!='3.8':
|
|
@@ -291,7 +281,7 @@ class kcwebssocket:
|
|
|
291
281
|
# def start():
|
|
292
282
|
# kwebsocket=kcwebssocket()
|
|
293
283
|
# kwebsocket.start()
|
|
294
|
-
|
|
284
|
+
def before_request():pass
|
|
295
285
|
def timestampToDate(times,format="%Y-%m-%d %H:%M:%S"):
|
|
296
286
|
"""时间戳转换时间
|
|
297
287
|
|
|
@@ -314,6 +304,9 @@ def send_mail(user,text="邮件内容",theme="邮件主题",recNick="收件人
|
|
|
314
304
|
|
|
315
305
|
return Boolean类型
|
|
316
306
|
"""
|
|
307
|
+
from email.mime.text import MIMEText
|
|
308
|
+
from email.utils import formataddr
|
|
309
|
+
|
|
317
310
|
ret=True
|
|
318
311
|
if not theme:
|
|
319
312
|
theme=config.email['theme']
|
|
@@ -337,12 +330,9 @@ def Template(path,**context):
|
|
|
337
330
|
return Templates(path,**context)
|
|
338
331
|
def Templates(path,**context):
|
|
339
332
|
"模板渲染引擎函数,需要完整的模板目录文件"
|
|
333
|
+
from mako.template import Template as kcwsTemplate
|
|
334
|
+
from mako.lookup import TemplateLookup
|
|
340
335
|
lookup = TemplateLookup(directories=[''])
|
|
341
|
-
# body=''
|
|
342
|
-
# with open(path, 'r',encoding='utf-8') as f:
|
|
343
|
-
# contents=f.read()
|
|
344
|
-
# t=kcwsTemplate(contents,lookup=lookup,module_directory=config.cache['path']+"/Template")
|
|
345
|
-
# body=t.render(**context)
|
|
346
336
|
if (path[:1]=="/" or path[1:2]==":") and ('.html' in path or '.shtml' in path or '.htm' in path):
|
|
347
337
|
t=kcwsTemplate(filename=path,module_directory=config.cache['path']+"/Template",lookup=lookup)
|
|
348
338
|
else:
|
|
@@ -351,6 +341,8 @@ def Templates(path,**context):
|
|
|
351
341
|
return body
|
|
352
342
|
def kcwsTemp(contents,**context):
|
|
353
343
|
"模板渲染引擎函数,传字符串进来"
|
|
344
|
+
from mako.template import Template as kcwsTemplate
|
|
345
|
+
from mako.lookup import TemplateLookup
|
|
354
346
|
lookup = TemplateLookup(directories=[''])
|
|
355
347
|
t=kcwsTemplate(contents,lookup=lookup,module_directory=config.cache['path']+"/Template")
|
|
356
348
|
body=t.render(**context)
|
|
@@ -471,6 +463,7 @@ def dateoperator(date,years=0,formats='%Y%m%d%H%M%S',months=0, days=0, hours=0,
|
|
|
471
463
|
|
|
472
464
|
return %Y%m%d%H%M%S
|
|
473
465
|
"""
|
|
466
|
+
from dateutil.relativedelta import relativedelta
|
|
474
467
|
formatss='%Y%m%d%H%M%S'
|
|
475
468
|
date=re.sub('[-年/月::日 时分秒]','',date)
|
|
476
469
|
if len(date) < 8:
|
|
@@ -495,7 +488,7 @@ def get_kcwebs_folder():
|
|
|
495
488
|
if not os.path.exists(get_kcwebs_folder()+"/pid/"):
|
|
496
489
|
os.makedirs(get_kcwebs_folder()+"/pid/", exist_ok=True)
|
|
497
490
|
def kill_all_kcwebs_pid(types='all'):
|
|
498
|
-
"""结束
|
|
491
|
+
"""结束kcwebs框架的所有子进程
|
|
499
492
|
|
|
500
493
|
types 可选 all 和 kcwebs
|
|
501
494
|
"""
|
|
@@ -757,6 +750,7 @@ class response:
|
|
|
757
750
|
|
|
758
751
|
ETag 缓存标识
|
|
759
752
|
"""
|
|
753
|
+
import filetype
|
|
760
754
|
status='200 ok'
|
|
761
755
|
header={"Cache-Control":"public, max-age=2592000"}
|
|
762
756
|
if isinstance(body,str):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
import
|
|
2
|
+
import re
|
|
3
3
|
from bson.objectid import ObjectId
|
|
4
4
|
from kcwebs.config import mongo as mongodb
|
|
5
5
|
class mongo:
|
|
@@ -8,6 +8,7 @@ class mongo:
|
|
|
8
8
|
__dbobj=None
|
|
9
9
|
__tabobj=None
|
|
10
10
|
def __setconn(self):
|
|
11
|
+
import pymongo
|
|
11
12
|
if not self.__clientobj:
|
|
12
13
|
if self.__config['retryWrites']:
|
|
13
14
|
strs='mongodb://'+self.__config['host']+':'+self.__config['port']+'/'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.2
|
|
2
2
|
Name: kcwebs
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.88
|
|
4
4
|
Summary: kcwebs作为web开发而设计的高性能框架
|
|
5
5
|
Home-page: https://docs.kwebapp.cn/index/index/2
|
|
6
6
|
Author: 百里-坤坤
|
|
@@ -9,5 +9,5 @@ Maintainer: 坤坤
|
|
|
9
9
|
Maintainer-email: fk1402936534@qq.com
|
|
10
10
|
License: MIT License
|
|
11
11
|
Description: kcwebs作为web开发而设计的高性能框架,采用全新的架构思想,注重易用性。遵循MIT开源许可协议发布,意味着个人和企业可以免费使用kcwebs,甚至允许把你基于kcwebs开发的应用开源或商业产品发布或销售。完整文档请访问:https://docs.kwebapp.cn/index/index/2
|
|
12
|
-
Keywords: kcwebs1.
|
|
12
|
+
Keywords: kcwebs1.88
|
|
13
13
|
Platform: UNKNOWN
|
|
@@ -50,7 +50,7 @@ def start():
|
|
|
50
50
|
packages = b,
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
install_requires = ['kcws>=1.
|
|
53
|
+
install_requires = ['kcws>=1.96','kcwmysql>=1.5','kcwhttp>=1.3','python-dateutil==2.9.0',
|
|
54
54
|
'pymongo==3.10.0','Mako==1.3.6','six>=1.12.0',
|
|
55
55
|
# 'websockets==10.4',
|
|
56
56
|
'curl_cffi==0.9.0',
|
|
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
|
{kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/common/__init__.py
RENAMED
|
File without changes
|
{kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/common/autoload.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/tpl/index/home.html
RENAMED
|
File without changes
|
{kcwebs-1.86 → kcwebs-1.88}/kcwebs/tempfile/kcwebs/app/api/controller/index/tpl/index/index.html
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|