please contact coder or direct to '
'dophon and leave your question
' + \
'request form:' + request.form + \
'request body:' + request.json if request.is_json else ''), 400
elif error_info == error_info_type.JSON:
return self_result.JsonResult(400, request.json if request.is_json else '',
'please check your request data').as_res()
elif error_info == error_info_type.XML:
return self_result.XmlResult(400, request.json if request.is_json else '',
'please check your request data').as_res()
# endregion
PK ! rD dophon/cluster_boot.py# coding: utf-8
from multiprocessing import Process, freeze_support
import time, socket, random
from flask import request, make_response
from urllib3 import PoolManager
from dophon import properties
from dophon_logger import *
logger = get_logger(DOPHON)
logger.inject_logger(globals())
ports = [] # 记录监听端口
proxy_clusters = {}
pool = PoolManager()
def main_freeze():
freeze_support()
def redirect_request():
logger.info('touch path: %s [success]' % (request.path))
res = pool.request(request.method, '127.0.0.1:' + str(random.choice(ports)) + request.path,
fields=request.json if request.is_json else request.form)
return make_response(res.data)
def outer_entity(boot):
# 重写路由信息(修改为重定向路径)
boot.get_app().before_request(redirect_request)
boot.run_app()
def run_clusters(clusters: int, outer_port: bool = False, start_port: int = 8800):
"""
运行集群式服务器
:param clusters: 集群个数
:param outer_port: 是否开启外部端口映射(映射端口为用户配置文件中配置的端口)
:param start_port: 集群起始监听端口
:return:
"""
from dophon import boot
for i in range(clusters):
current_port = start_port + i
create_cluster_cell(boot=boot, port=current_port)
ports.append(current_port)
while len(ports) != clusters:
time.sleep(5)
logger.info('启动检测端口监听')
for port in ports:
if check_socket(int(port)):
continue
logger.info('集群端口: %s ' % ports)
if outer_port:
logger.info('启动外部端口监听[%s]' % (properties.port))
outer_entity(boot)
def create_cluster_cell(boot, port):
# http协议
proc = Process(target=boot.run_app, kwargs={
'host': '127.0.0.1',
'port': port
})
proc.start()
def check_socket(port: int):
s = socket.socket()
flag = True
while flag:
try:
ex_code = s.connect_ex(('127.0.0.1', port))
flag = False
return int(ex_code) == 0
except Exception as e:
time.sleep(3)
continue
PK ! |33 33 dophon/docker_boot.py# encoding: utf-8
from dophon.tools import is_windows
from dophon import boot
import logging
import re
import os
import socket
import sys
import threading
import time
from urllib import request
def read_self_prop():
try:
def_prop = __import__('dophon.def_prop.default_properties', fromlist=True)
u_prop = __import__('application', fromlist=True)
# 对比配置文件
for name in dir(def_prop):
if re.match('__.*__', name):
continue
if name in dir(u_prop):
continue
setattr(u_prop, name, getattr(def_prop, name))
sys.modules['properties'] = u_prop
sys.modules['dophon.properties'] = u_prop
except Exception as e:
logging.error(e)
sys.modules['properties'] = def_prop
sys.modules['dophon.properties'] = def_prop
try:
read_self_prop()
except Exception as e:
logging.error('没有找到自定义配置:(application.py)')
logging.error('引用默认配置')
from dophon import properties
from dophon_logger import *
logger = get_logger(DOPHON)
logger.inject_logger(globals())
def IsOpen(ip, port):
"""
检查端口是否被占用
:param ip:
:param port:
:return:
"""
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect((ip, int(port)))
logger.error('端口被占用:' + port)
s.close()
return True
except:
return False
def listen(code):
"""
监听命令状态码
:param code: os.system()命令返回码
:return: 当不正常执行会抛出错误,谨慎使用!!!
"""
if code >> 8 is 0:
pass
else:
raise Exception('命令执行错误!')
def listen_container_status(container_port, loop_count: int = 3, wait_sec: int = 10):
"""
检测容器端口存活
:return:
"""
# 一分钟后检测
time.sleep(60)
# 默认检测三次
curr_count = 1
while int(curr_count) <= int(loop_count):
# 默认间隔10秒
time.sleep(wait_sec)
if IsOpen(get_docker_address(), int(container_port)):
raise Exception('端口映射异常')
else:
# 报错证明端口正常占用
# 发起请求
url = f'http://{get_docker_address()}:{container_port}/rule/json'
logger.info('容器存活性检查:' + url)
res = request.urlopen(url)
if not res.read():
raise Exception('服务启动异常')
curr_count += 1
logger.info('容器启动成功,请在命令行输入docker ps查看')
def get_docker_address():
"""
获取容器载体ip
:return:
"""
result = os.popen('ipconfig' if is_windows() else 'ifconfig').readlines()
result_lines = []
r_l_copy = []
while result:
line = result[0]
if re.search('^.*(d|D)(o|O)(c|C)(k|K)(e|E)(r|R).*$', line):
result_lines = result.copy()
break
else:
result.pop(0)
for line in result_lines:
line = re.sub('\s*', '', line)
if line and re.search('([0-9]+\.)+[0-9]+$', line) and re.search('(i|I)(p|P)', line):
r_l_copy.append(
re.search('([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', line).group(0)
)
return r_l_copy.pop(0) if r_l_copy else 'can not get container ip'
def attach_container(base_name: str):
"""
进入容器
:return:
"""
os.system('docker attach ' + base_name)
def has_version_expr(info: str):
return re.search('(>=|==|=>|<=|=<)', info)
def run_as_docker(
entity_file_name: str = None,
container_port: str = str(properties.port),
docker_port: str = str(properties.port),
attach_cmd: bool = False,
alive_test: bool = False,
save_image: bool = False,
extra_package: dict = {},
cache_virtual_env_dir: str = '',
package_repository: str = '',
package_cache_path: str = '',
timezone: str = 'Asia/Shanghai',
img_author: str = 'local_user',
img_message: str = 'a new image',
):
"""
利用docker启动项目
:param save_image: 是否保存镜像(选择后不启动,直接导出镜像)
:param alive_test: 容器存活检测(默认不检测)
:param entity_file_name: 入口文件名(包括后缀)
:param container_port: 容器暴露端口
:param docker_port: 容器内部端口 -> 集群模式下的暴露端口,一般为配置文件定义的端口
:param attach_cmd: 是否进入容器内部sh
:param extra_package: 额外需要加载的包以及版本
:param cache_virtual_env_dir: 指定的虚拟器路径,在启动文件同级目录或下级目录
:param package_repository: 自带缓存包路径,若为空会自动执行pip安装
# 阿里云仓库 => https://mirrors.aliyun.com/pypi/simple/
:param package_cache_path: 包缓存路径
:param timezone: 时区代号
:return:
"""
# 依赖包的缓存
package_cache = []
try:
logger.info('容器前期准备')
root = re.sub('\\\\', '/', properties.project_root)
base_name = os.path.basename(root)
import platform
p_version = platform.python_version()
work_dir = './' + base_name
# 生成依赖文件
logger.info('生成依赖文件')
os.system('pip freeze --all >pre_requirements.txt')
with open('./pre_requirements.txt', 'r') as file:
with open('./requirements.txt', 'w') as final_file:
for line in file.readlines():
if line.startswith('-e'):
continue
for key in sys.modules.keys():
if re.search('^dophon(_\w+)*$', key):
pass
else:
if re.search('^_+', key) or re.search('(_|__|\.)+.+$', key):
# print(key,end=']')
continue
module_path = re.sub(
'-',
'_',
re.sub('''(>=|==|=>|<=|=<|<|>|=)['"\w\.]+\s+''', '', line.lower())
)
# print(module_path, '===>', line, '====>', key) if line.startswith('dophon') and key.startswith(
# 'dophon') else None
if re.search(module_path.lower(), key.lower()) or re.search(key.lower(), module_path.lower()):
if module_path in package_cache:
continue
package_cache.append(module_path)
if module_path in extra_package:
final_file.write(f'{module_path}>={extra_package[module_path]}\n')
extra_package.pop(module_path)
else:
final_file.write(line)
continue
# 写入额外包
for package_name, package_version in extra_package.items():
if package_name in extra_package:
final_file.write(
''.join(
[
package_name,
'' if has_version_expr(extra_package[package_name]) else '>=',
extra_package[package_name],
'\n']
)
)
# 会报迭代修改异常
# extra_package.popitem()
else:
final_file.write(
''.join(
[
package_name,
'' if has_version_expr(extra_package[package_name]) else '>=',
package_version,
'\n']
)
)
# 生成Dockerfile
logger.info('生成Dockerfile')
with open('./Dockerfile', 'w') as file:
file.write('FROM python:' + p_version + '\n')
file.write('ADD . ' + work_dir + '\n')
file.write('ADD . ' + work_dir + '/' + base_name + '\n')
file.write('WORKDIR ' + work_dir + '\n')
if cache_virtual_env_dir:
file.write(f'ADD {cache_virtual_env_dir} ~/.cache_virtual_env' + '\n')
file.write(f'CMD ~/.cache_virtual_env/Scripts/activate' + '\n')
if package_cache_path:
file.write(f'ADD {package_cache_path} ~/.package_cache' + '\n')
file.write(f'CMD python -m import sys;sys.path.append("~/.package_cache");' + '\n')
if package_repository:
# 阿里云仓库 => https://mirrors.aliyun.com/pypi/simple/
file.write(f'RUN pip install -i {package_repository} -r requirements.txt' + '\n')
else:
file.write('RUN pip install --no-cache-dir -r requirements.txt' + '\n')
# 设置系统时区
file.write(f'ENV TZ={timezone}' + '\n')
file.write('RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone' + '\n')
file.write('CMD ["python","./' + (entity_file_name if entity_file_name else 'Bootstrap.py') + '"]' + '\n')
# file.write('CMD ["/bin/bash"]' + '\n')
os.system('cd ' + root)
logger.info('暂停已运行的实例')
os.system('docker stop ' + base_name)
logger.info('移除已运行的实例')
os.system('docker rm ' + base_name)
logger.info('移除旧镜像')
os.system('docker rmi ' + base_name)
logger.info('检测配置合法性')
if IsOpen('127.0.0.1', int(docker_port)):
# 端口被占用
logger.warn('映射端口被占用!!')
logger.info('建立镜像')
listen(os.system('docker build -t ' + base_name + ' .'))
logger.info('运行镜像')
os.system(
'docker run -p ' + container_port
+
':' +
docker_port +
' -d --name ' +
base_name + ' ' +
os.path.basename(
root))
if save_image:
logger.info('检测容器状态')
from subprocess import Popen, PIPE
status_code = '\'{{.State.Status}}\''
__status = 'running'
while __status == 'running':
p = Popen(
f"docker inspect {base_name} -f {status_code}",
stdout=PIPE,
stderr=PIPE
)
p.wait()
__status = eval(p.stdout.read().decode('utf-8'))
from urllib import request
try:
res = request.urlopen(f'http://127.0.0.1:{container_port}/rule/map')
# for name in dir(res):
# print(f'{name}===>{getattr(res, name)}')
if int(res.code) == 200:
break
except:
pass
if __status == 'exited':
raise Exception(f'容器启动失败,状态为{__status}')
logger.info('提交镜像')
from datetime import datetime
__commit_image_name = f'image_{base_name}{datetime.now().timestamp()}'
# 保存镜像
os.system(f"""
docker commit --author "{img_author}" --message "{img_message}" {base_name} {__commit_image_name}
""")
logger.info('生成镜像')
os.system(f"""docker save -o {base_name}.img.bak.__ {__commit_image_name}""")
exit(0)
return
logger.info('打印容器内部地址(空地址代表启动失败)')
os.system('docker inspect --format=\'{{.NetworkSettings.IPAddress}}\' ' + base_name)
logger.info('打印容器载体地址')
print(get_docker_address())
if alive_test:
logger.info('启动检测容器端口')
threading.Thread(target=listen_container_status, args=(container_port,)).start()
if attach_cmd:
logger.info('进入镜像')
# threading.Thread(target=attach_container,args=(base_name,)).start()
attach_container(base_name)
logger.info('容器启动完毕')
except Exception as e:
logger.error(e)
PK ! DO% % dophon/pre_boot.py# coding: utf-8
from dophon_properties import *
import os, sys
import xml.dom.minidom as dom
get_properties(DOPHON)
import properties
from dophon_logger import *
logger = get_logger(DOPHON)
logger.inject_logger(globals())
name_sep = '_'
modules_list = []
def check_modules():
"""
加载框架配置模块
:return:
"""
logger.info('校验模块')
# logger.info('更新pip')
# os.system(f'python -m pip install --upgrade pip')
modules_path = properties.project_root + '/module.xml'
if os.path.exists(modules_path):
with open(modules_path) as modules_file:
modules_tree = dom.parse(modules_file)
# print(modules_tree)
modules_info = modules_tree.getElementsByTagName('module')
# print(modules_info)
for module_info in modules_info:
pre_name = module_info.getElementsByTagName('pre-name')
pre_name = pre_name[0].childNodes[0].data if pre_name and pre_name[0].childNodes else None
name = module_info.getElementsByTagName('name')
name = name[0].childNodes[0].data if name and name[0].childNodes else None
version = module_info.getElementsByTagName('version')
version = version[0].childNodes[0].data if version and version[0].childNodes else None
module_name = ((pre_name + name_sep) if pre_name else '') + name
module_code_str = ((pre_name + '.') if pre_name else '') + name
# 添加模块到模块列表
modules_list.append(module_code_str)
while True:
__module = None
try:
# 校验模块安装
module = __module if __module else __import__(module_name)
# 等待模块安装完成
sys.modules[module_code_str] = module
logger.info(f'模块{getattr(module,"__name__")}依赖建立完毕,引入别名{pre_name}.{name}')
break
except Exception as e:
# print(e)
logger.info(f"install {module_name} >={version if version else 'release'}")
# 利用pip模块安装所需模块
pip_arg_list = ['pip', 'install',
module_name + (('>=' + version) if version else ''),
'--user']
exe_pip_args = ['install',
module_name + (('>=' + version) if version else ''),
'--user']
if not version:
pip_arg_list.append('-U')
exe_pip_args.append('-U')
# 利用pip安装模块
import pip
from pip._internal import main as _main
# path = os.path.dirname(os.path.dirname(__file__))
# sys.path.insert(0, path)
os.system(f'pip install {module_name}')
# _main(['list'])
# _main(exe_pip_args)
__module = __import__(module_name)
# raise ModuleNotFoundError(
# f"please use '{' '.join(pip_arg_list)}' to install module %s ")
logger.info('模块校验完毕')
PK ! 0
dophon/tools/__init__.pyimport platform
def is_windows():
return 'Windows' == platform.system()
def is_not_windows():
return not is_windows()
def show_banner():
print(f"""
.o8 oooo
"888 `888
.oooo888 .ooooo. oo.ooooo. 888 .oo. .ooooo. ooo. .oo.
d88' `888 d88' `88b 888' `88b 888P"Y88b d88' `88b `888P"Y88b
888 888 888 888 888 888 888 888 888 888 888 888
888 888 888 888 888 888 888 888 888 888 888 888
`Y8bod88P" `Y8bod8P' 888bod8P' o888o o888o `Y8bod8P' o888o o888o
888
o888o
Author:CallMeE
Base:Flask or Tornado
Url:https://github.com/Ca11MeE/dophon.git
https://gitee.com/callmee/dophon.git
""")
def module_edge_print(module_name):
def fun(f):
def fields(*args, **kwargs):
print('------------------', module_name, '------------------\n')
f(*args, **kwargs)
print('\n------------------', module_name, '------------------\n\n\n')
return fields
return fun
PK !
dophon/tools/dynamic_import.pyimport os
from subprocess import Popen, PIPE, DEVNULL
from dophon_properties import *
from tqdm import tqdm
get_property(DOPHON)
from dophon_logger import *
get_logger(DOPHON).inject_logger(globals())
from dophon.tools import is_windows
from importlib import util
def __dynamic_import(module_name, version='*'):
__module = None
while True:
try:
# 校验模块安装
util.find_spec(f'{module_name}')
# exec(f'import {module_name}')
module = __module if __module else __import__(module_name)
# sys.modules[module_name] = module
logger.info(f'模块{module_name}依赖建立完毕')
return module
except Exception as e:
# print(e)
logger.info(f"install {module_name} >={version if version else 'release'}")
# 利用pip模块安装所需模块
pip_arg_list = ['pip', 'install',
module_name + (('>=' + version) if version else ''),
'--user']
exe_pip_args = ['install',
module_name + (('>=' + version) if version else ''),
'--user']
if not version:
pip_arg_list.append('-U')
exe_pip_args.append('-U')
# 利用popen执行命令安装包
# p = Popen(f'pip install {module_name} {"" if is_windows() else "--user"}', stdout=DEVNULL, stderr=DEVNULL)
p = Popen(f'pip install {module_name} {"" if is_windows() else "--user"}',stdout=PIPE,stderr=PIPE)
p.wait()
# tqdm(p.stdout.readlines(), f'install {module_name}')
lines_queue = tqdm(p.stdout.readlines())
for item in lines_queue:
lines_queue.set_description(item)
__module = __import__(module_name)
def __d_import(module_name: str, version: str = '*'):
"""
将需要安装的包信息放入全局字典中
:param module_name:
:param version:
:return:
"""
while True:
try:
__import__(module_name)
break
except Exception as e:
# print(e)
__dynamic_import(module_name=module_name, version=version)
def d_import(module_name, version: str = '*'):
"""
对外暴露的动态添加函数入口
:param module_name:
:param version:
:return:
"""
__d_import(module_name=module_name, version=version)
PK ! ( dophon/tools/framework_const/__init__.pyPK ! eI I / dophon/tools/framework_const/error_info_type.py"""
错误信息类型
"""
HTML = 'HTML'
JSON = 'JSON'
XML = 'XML'
PK ! j( + dophon/tools/framework_const/self_result.pyfrom flask import Response
from flask import jsonify
"""
框架自身返回结果类
"""
class JsonResult:
"""
json类型返回结果类
"""
__body = {}
default_mimetype = 'application/json'
def __init__(self, event=200, data={}, msg=''):
self.__status = event
self.__body['event'] = str(event)
self.__body['data'] = str(data)
self.__body['msg'] = str(msg)
def as_res(self):
return jsonify(self.__body), self.__status
class XmlResult:
"""
XML类型返回结果类
"""
__dom = ''
default_mimetype = 'application/xml'
def __init__(self, event=200, data={}, msg=''):
self.__status = event
self.__dom = self.__dom + '\n' + str(event) + '\n\n'
self.__dom = self.__dom + '\n' + self.parse_to_node(data) + '\n\n'
self.__dom = self.__dom + '\n' + str(msg) + '\n\n'
self.__dom = self.__dom + ''
def parse_to_node(self, data):
nodes = []
if isinstance(data, dict):
for k, v in data.items():
nodes.append(
'<' + str(k) + '>\n' + (
str(v) if not isinstance(v, dict) else self.parse_to_node(v)) + '\n' + str(
k) + '>\n')
elif isinstance(data, list):
for index in range(len(data)):
nodes.append(
'<' + str(index) + '>\n' + (
str(data[index]) if not isinstance(data[index], dict) else self.parse_to_node(
data[index])) + '\n' + str(
index) + '>\n')
else:
nodes.append(str(data))
return '\n'.join(nodes)
def as_res(self):
return Response(str(self.__dom), mimetype=self.default_mimetype, status=self.__status)
PK ! XJ dophon/tools/gc/__init__.pyimport gc
gc.enable() # 开启gc
def show_gc_leak(method):
"""
打印并获取gc信息
1.不可达对象统计
2.不可回收对象统计
:param method: 打印函数引用
:return:
"""
_unreachable = gc.collect()
method(
'%s, %s, %s, %s, %s' %
(
"unreachable object num: %d" % (_unreachable,),
"garbage object num: %d" % (len(gc.garbage)),
"gc object num: %d" % (len(gc.get_objects())),
"gc threshold num: %d" % (len(gc.get_threshold())),
"gc stats num: %d" % (len(gc.get_stats())),
)
)
return {
'unreachable object num': _unreachable,
'garbage object num': len(gc.garbage),
"gc object num": len(gc.get_objects()),
# "gc object info": gc.get_objects(),
"gc threshold num": len(gc.get_threshold()),
"gc threshold info": str(gc.get_threshold()),
"gc stats num": len(gc.get_stats()),
"gc stats info": str(gc.get_stats()),
}
PK ! ! dophon/tools/sys_utils.pyimport re
def to_dict(obj: object) -> dict:
result = {}
for name in dir(obj):
if re.match('__.*__', name):
continue
else:
result[name] = getattr(obj, name)
return result
def to_lower_camel(name: str):
result = []
str_len = len(name)
for c_index in range(str_len):
c = name[c_index]
if c.islower():
result.append(c)
continue
if (c_index + 1) < str_len and name[c_index + 1].islower():
__append = c.lower()
else:
__append = c
if c_index <= 0:
result.append(__append)
continue
result.append(f'_{__append}' if __append.islower() else f'{__append}')
return ''.join(result)
PK ! :U&- &- $ dophon-1.3.0.post3.dist-info/LICENSE Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
PK !HڽT U " dophon-1.3.0.post3.dist-info/WHEEL
A
н#Z;/"d&F[xzw@Zpy3Fv]\fi4WZ^EgM_-]#0(q7PK !H5U
9 % dophon-1.3.0.post3.dist-info/METADATAJ0y6lV*e
¶:t=B$ed2W~dj~"{MWj,JXȚ59qt*S#Ցx!J8ֶĭ4E;֮x!iM(W)fz8nVrJ}XryOт6D0ydnzS.Syr{Fbb{LM|FN9QQN٥y_ܸ}>454gLλS4*µb vP?ySSgctoPK !HRG D # dophon-1.3.0.post3.dist-info/RECORD}rH<ٗXF@Eӏ::qh|2JQTEoELC<82xpuޠ;q@Y5UMsـGJc_TܶOkxKvz,<,deA㌽As.q|
%VSYݹF4FzG"}pS0&fǠEYȗ[Hǽw@:ږKPJy`:`x%:{$! `}@;,Q+P8!tnPJPb|T+#±+x#8ӵ2ʦ>XZCDa
\n8L%1ROA<3tW}SD?F(.^ЖٿYzDu a.|)'2:±eM
zqOzwPt ֒UFPgskN5NF|Ib\:^n5myy*J۸R\5XsㄺUQ*lFƺ*11s2k/UO"m73Wƶ?#,7o[ߍ>/?3%Up&jxwGQi{=e~`6*ݲ{0IMc ærd |j :l'I9F^,sNJְ_=E=APK ! `& dophon/__init__.pyPK ! Y Y O dophon/annotation/__init__.pyPK ! 0o+ + dophon/annotation/AutoWired.pyPK ! ҥN ) 8 dophon/annotation/description/__init__.pyPK ! d^ ^ ! A dophon/annotation/req/__init__.pyPK ! 5A*ނ ! ` dophon/annotation/res/__init__.pyPK ! f=` ` qe dophon/annotation/side_pkg.pyPK ! {k k h dophon/boot.pyPK ! rD 4 dophon/cluster_boot.pyPK ! |33 33 M dophon/docker_boot.pyPK ! DO% % dophon/pre_boot.pyPK ! 0
dophon/tools/__init__.pyPK !
$ dophon/tools/dynamic_import.pyPK ! ( / dophon/tools/framework_const/__init__.pyPK ! eI I / K/ dophon/tools/framework_const/error_info_type.pyPK ! j( + / dophon/tools/framework_const/self_result.pyPK ! XJ 7 dophon/tools/gc/__init__.pyPK ! ! < dophon/tools/sys_utils.pyPK ! :U&- &- $ f? dophon-1.3.0.post3.dist-info/LICENSEPK !HڽT U " l dophon-1.3.0.post3.dist-info/WHEELPK !H5U
9 % bm dophon-1.3.0.post3.dist-info/METADATAPK !HRG D # n dophon-1.3.0.post3.dist-info/RECORDPK s