diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..94a25f7f4cb416c083d265558da75d457237d671 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 86d0c3d3d0c6f505988060aac515c9a073b8b121..e401dff552ac4f8d968392751388354c258b3f2c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ # wyh_web_tools -自定义网络工具 \ No newline at end of file +自定义网络工具 + +## 环境搭建 +```shell +mkvirtualenv -p python3 wyh + +# 进入虚拟环境 +workon wyh + +#安装包 +pip install -r requirements.txt + +pip install -i https://pypi.doubanio.com/simple/ flask==1.1.2 + + +``` + +2. 创建数据库 +create database wyh_ind default charset=utf8; # 创建数据库 +create user wyh identified by 'wyh123456'; # 创建用户&密码 +grant all on wyh_ind.* to 'wyh'@'%'; # 给用户wyh开启数据库python的所有操作权限 +flush privileges; # 刷新权限```angularjs diff --git a/main.py b/main.py new file mode 100644 index 0000000000000000000000000000000000000000..d60647e1fb1ecf32e62b342687c77195a01fc9f7 --- /dev/null +++ b/main.py @@ -0,0 +1,16 @@ +# 导入Flask类 +from flask import Flask + +# Flask类接收一个参数__name__ +app = Flask(__name__) + + +# 装饰器的作用是将路由映射到视图函数index +@app.route('/') +def index(): + return 'Hello World' + + +# Flask应用程序实例的run方法启动WEB服务器 +if __name__ == '__main__': + app.run() diff --git a/requiremnets.txt b/requirements.txt similarity index 57% rename from requiremnets.txt rename to requirements.txt index 24927dd24b5491098199532746dcdace64382470..49b2ad30e72852baa8b69daf60ef2be00895acdd 100644 --- a/requiremnets.txt +++ b/requirements.txt @@ -1,7 +1,12 @@ asgiref==3.4.1 +click==8.0.1 +colorama==0.4.4 Django==2.2.2 +Flask==1.1.2 +itsdangerous==2.0.1 Jinja2==3.0.1 MarkupSafe==2.0.1 PyMySQL==1.0.2 pytz==2021.1 sqlparse==0.4.1 +Werkzeug==2.0.1