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 ...
随机推荐
- 这些git命令判断提交到哪个分支哪个项目上
git branch -r fuweikun@pengfei:~/e1_cp/AMSS$ git branch* 8939-E1-2104026-dev git config -l fuweikun@ ...
- Delphi疑难问题整理!!!
一.Dll调用时报错,例如: TGetResPrice = function(var AName: string; AFileName: string): TResourceRecArray; std ...
- cocos源码分析--RenderTexture
cocos中RenderTexture主要用来实现截屏,然后把截取出来的图片保存到磁盘中,除了保存图片和渲染纹理,它还可以得到一些预渲染结果,并将这些结果作为一种纹理数据. 例如我们可以用RGB5_A ...
- Redis的集群模式
集群 即使使用哨兵,此时的Redis集群的每个数据库依然存有集群中的所有数据,从而导致集群的总数据存储量受限于可用存储内存最小的数据库节点,形成木桶效应.由于Redis中的所有数据都是基于内存存储,这 ...
- 用singleton单例模式实现一个模块
对于具有唯一性的模块(例如,购物车项目中的物品数据,各个页面都要使用它,而且是唯一的数据),用singleton模式. var mySingleton = (function() { var priv ...
- oracle取出多个字段列中的最大值和最小值
greatest 函数和least函数 select serverid, greatest(e.core0, e.core1, e.score2 ) from e
- official shiro(Reference Manual)
Apache Shiro Reference Documentation Overview Core Spring-based Applications 1.Overview pom.xml < ...
- LeetCode 7 Reverse Integer & int
Reverse Integer 想用余10直接算,没想到 -123%10 是 7, 原因 -123-(-123//10*10) r=a-n*[a/n] 以上,r是余数,a是被除数,n是除数. 唯一不同 ...
- tornado-模版reverse_url
from tornado.web import url handler=[ url(r"/hello", grab_handler.HelloHandler, name='hell ...
- Java命令运行.class文件
class使用全名(点号间隔):java headfirst.designpatterns.proxy.gumball.GumballMonitorTestDrive