diff --git a/bin/core/__init__.py b/bin/core/__init__.py index 3944db4..d4c17cc 100644 --- a/bin/core/__init__.py +++ b/bin/core/__init__.py @@ -4,3 +4,4 @@ # @Development Tool: PyCharm # @Create Time: 2022/2/5 # @File Name: __init__.py.py + diff --git a/bin/core/logger.py b/bin/core/logger.py deleted file mode 100644 index 3495169..0000000 --- a/bin/core/logger.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 -# -- coding:utf-8 -- -# @Author: markushammered@gmail.com -# @Development Tool: PyCharm -# @Create Time: 2022/2/6 -# @File Name: logger.py \ No newline at end of file diff --git a/bin/tests/base2img.py b/bin/tests/base2img.py index 5917832..e9db269 100644 --- a/bin/tests/base2img.py +++ b/bin/tests/base2img.py @@ -14,17 +14,10 @@ def convert() -> None: :return: """ # image转base64 - lst = [] - for i in range(10): - with open(f'../../static/theme/t2/{i}.svg', 'rb') as f: - base64_data = base64.b64encode(f.read()) - base64_code = 'data:image/jpeg;base64,' + base64_data.decode('utf-8') - lst.append(base64_code) - - print(lst) - - for i in lst: - print(i) + with open(f'../../static/example.png', 'rb') as f: + base64_data = base64.b64encode(f.read()) + base64_code = 'data:image/jpeg;base64,' + base64_data.decode('utf-8') + print(base64_code) convert() diff --git a/db/data.db b/db/data.db index 7e1a6ed..95e4eaa 100644 Binary files a/db/data.db and b/db/data.db differ diff --git a/requirements.txt b/requirements.txt index c9cbb57..20c936a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ Flask~=2.0.2 -requests~=2.27.1 \ No newline at end of file +requests~=2.27.1 +gevent~=21.12.0 +colorlog~=6.6.0 \ No newline at end of file diff --git a/static/index.html b/static/index.html index c8622b2..02e3113 100644 --- a/static/index.html +++ b/static/index.html @@ -7,18 +7,21 @@ .intro{ text-align: center; } + a{ + color: green; + }
- 看到这句话就说明程序正常运行啦!! +
+
+ 看到这句话就说明程序正常运行啦!! 文档
本服务使用Python-Flask开发(Flask 官方地址:Flask )
调用示例: 127.0.0.1:5000/API?name=main 注: 调用支持POST 和 GET 方法请求
- 已经搭建好的私人服务器调用地址:PythonAnyWhere -
数字图片作者: 碎蜂
项目开源协议: Apache-2.0 即: @@ -27,6 +30,12 @@
你可以在注明来源版权信息的情况下对源代码进行任意分发和修改以及衍生
+
+

效果应该是这样的:

+ example +
+ (这只是一张图片) +
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 5cffbc9..949520c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,6 +1,6 @@ - -Request Counter - {{ title }} + +Flask Counter - {{ title }} @@ -9,4 +9,5 @@ + \ No newline at end of file