22.executor service Flask
pip包管理器 没有npm那么强大 不支持 npm --save install 这样的方法
但是我们有别的方法
安装Flask

但是呢
我们不能把它存放在package .json
那就需要我们自己装就很烦
不如我们
npm --save install方便
我们自己来实现
我们即将我们的依赖关系写入一个文件
然后我们用 pip install -r +文件名
来执行文件


然后我们

The directory '/home/han/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/han/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Flask in /usr/local/lib/python2./dist-packages (from -r requirements.txt (line ))
Requirement already satisfied: Werkzeug>=0.14 in /usr/local/lib/python2./dist-packages (from Flask->-r requirements.txt (line ))
Requirement already satisfied: click>=5.1 in /usr/local/lib/python2./dist-packages (from Flask->-r requirements.txt (line ))
Requirement already satisfied: Jinja2>=2.10 in /usr/local/lib/python2./dist-packages (from Flask->-r requirements.txt (line ))
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python2./dist-packages (from Flask->-r requirements.txt (line ))
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2./dist-packages (from Jinja2>=2.10->Flask->-r requirements.txt (line ))
result
发现他去尝试安装Flask
以后我们就将安装的东西放在里面 他会一行行执行

python里面是没有大括号的
里面的逻辑就是靠换行 空格或者TAP来确定的
一定要注意

把他启动


127.0.0.1就是localhost
我们用postman来看看能不能work

说明Flask运作正常
那么我们Flask有没有类似
nodemon或者ng build --watch这种
只要修改代码就会自动更新重启的方法
有的你只要
加入一个参数

我们来修改文件试试

然后postman

发现没变化
其实第一次需要我们手动执行一次
因为我的debug关了

那么我们手动执行一次

然后我们再postman

22.executor service Flask的更多相关文章
- 22、Flask实战第22天:Flask信号
Flask中的信号使用的是一个第三方插件blinker.通过pip list看一下是否安装,如果没有,则使用如下命令安装 pip install blinker 自定义信号 自定义信号分为3步: ①定 ...
- Mybatis-generator生成Service和Controller
好久记录笔记,这段时间做政府的项目,数据录入系统基本都是通过excel导入,且数据量大,许多也是单表的录入,这就有很多可以通用的代码,如controller,service层的那一套都是可以代码生成, ...
- Executor Framework
Why? look at the following 2 pieces of code for implementing a simple web server based on socket, ca ...
- Flask Web开发从入门到放弃(一)
第1章 章节一 01 内容概要 02 内容回顾 03 路飞学城之加入购物车 04 路飞学城之结算 05 路飞学城之立即支付 06 路飞学城之后续计划 07 Flask框架简介和快速使用 08 FLas ...
- Flask框架之功能详解
1|0浏览目录 配置文件 路由系统 视图 请求相关 响应 模板渲染 session 闪现 中间件 蓝图(blueprint) 特殊装饰器 1|1配置文件 知识点 给你一个路径 "settin ...
- flask框架(二):简单的登录demo
一:main.py # -*- coding: utf-8 -*- # @Author : Felix Wang # @time : 2018/7/3 22:58 from flask import ...
- flask框架(一):初入
1.装饰器回顾 # -*- coding: utf-8 -*- # @Author : Felix Wang # @time : 2018/7/3 17:10 import functools &qu ...
- 阻塞队列BlockingQueue 学习
import java.util.Random; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Time ...
- Rhel6-cacti+nagios+ganglia(nginx)配置文档
(lnmp平台) 系统环境: rhel6 x86_64 iptables and selinux disabled 主机: 192.168.122.185 server85.example.com 1 ...
随机推荐
- c#语言函数
class Program {访问修饰符 函数名(参数1,参数2){ 函数体 return 返回值} 无参数,无返回值 public static void abc() ...
- RecyclerView中设置match_parent无效;
在RecyclerView中宽度设置了match_parent,但是效果和wrap_content一样: 说下解决方法: 1.这样子写,match_parent没有效果: View v = View. ...
- Vue-ui常用组件库整理
Vue-ui常用组件库整理 查看全部整理内容==> element-ui Element 是由饿了么UED设计.饿了么大前端开发的一套基于 Vue 2.0 的桌面端组件库. 这款是我用了很久的, ...
- 使用Git将项目上传到GitHub管理
首先你需要一个github账号.https://github.com/ 我们使用git需要先安装git工具. 1.进入Github首页,点击New repository新建一个项目 2.填写相应信息后 ...
- 详解CSS3属性前缀(转)
原文地址 CSS3的属性为什么要带前缀 使用过CSS3属性的同学都知道,CSS3属性都需要带各浏览器的前缀,甚至到现在,依然还有很多属性需要带前缀.这是为什么呢? 我的理解是,浏览器厂商以前就一直在实 ...
- suricata 关键字补充说明
基本关键字 1.msg(对匹配到的规则的说明,第一部分约定用大写字母表示,msg始终是签名的第一个关键字) 注意:msg中必须转义以下字符: ; \ " msg :“ATTACK-RESPO ...
- mke2fs
mke2fs - create an ext2/ext3/ext4 filesystem # mke2fs -b -c -N -t ext4 /dev/sdb #(注意末尾是/dev/sdb....? ...
- android 开发 实现一个ListView套嵌GirdView的滚动布局
效果图 实现思维: 首先要处理管理好需要导入的数据,我们这里创建class来处理这些数据并且便于管理它们. 创建一个主activity的布局,里面需要一个ListView控件. 创建一个class继承 ...
- couchdb
http://docs.couchdb.org/en/2.0.0/api/database/find.html#find-selectors
- 安装hyperledger fabric V1.0.0-beta
安装文档位置: https://github.com/hyperledger/fabric fabric代码托管地址 https://hyperledger-fabric.readthedoc ...