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 ...
随机推荐
- mobilehack -转
# mobileHack##工具类网站 [HTML5 与 CSS3 技术应用评估](http://html5please.com/ "html5与css3技术应用评估") [各种奇 ...
- vue2.0-组件传值
父组件给子组件传值,子组件用props接收 例子:两个组件,一个是父组件标签名是parent,一个是子组件标签名是child,并且child组件嵌套在父组件parent里,大概的需求是:我们子组件里需 ...
- ThreadException
在windows窗体程序中,使用 ThreadException 事件来处理 UI 线程异常,使用 UnhandledException 事件来处理非 UI 线程异常.ThreadException可 ...
- js基本方法
Math.random() 日期时间函数(需要用变量调用):var b = new Date(); //获取当前时间b.getTime() //获取时间戳b.getFullYear() //获取年份b ...
- .NET Core和.NET Standard
作为.NET家族的最新成员,有很多关于.NET Core和.NET Standard的误解,以及它们于.NET Framework之间的区别.在这篇文章,我会准确的解释他们究竟是什么,并看看何时应选择 ...
- 洛谷 : P3374 【模板】树状数组 1 P3368 【模板】树状数组 2
******************************************************************************** 属于模板题了,一个单点修改区间询问,一 ...
- mybatis 设置新增数据后返回自增主键
主要是注解@Options起作用,语句如下: @Insert({ "INSERT INTO application_open_up ( " + "app_open_hos ...
- 由echarts想到的js中的时间类型
在工作中使用echarts时,偶然发现折线图中对时间类型变量的用法: now前面的+号何解? now = new Date(+now + oneDay); 后来查阅资料,看到一篇博客,解释如下:这是对 ...
- jieba gensim 用法
简单的问答已经实现了,那么问题也跟着出现了,我不能确定问题一定是"你叫什么名字",也有可能是"你是谁","你叫啥"之类的,这就引出了人工智能 ...
- (转)SVN搭建(附下载地址)
原文地址:http://blog.csdn.net/jiminull/article/details/7763795 一.SVN服务端 1.VisualSVN Server下载: http://dow ...