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的更多相关文章

  1. 22、Flask实战第22天:Flask信号

    Flask中的信号使用的是一个第三方插件blinker.通过pip list看一下是否安装,如果没有,则使用如下命令安装 pip install blinker 自定义信号 自定义信号分为3步: ①定 ...

  2. Mybatis-generator生成Service和Controller

    好久记录笔记,这段时间做政府的项目,数据录入系统基本都是通过excel导入,且数据量大,许多也是单表的录入,这就有很多可以通用的代码,如controller,service层的那一套都是可以代码生成, ...

  3. Executor Framework

    Why? look at the following 2 pieces of code for implementing a simple web server based on socket, ca ...

  4. Flask Web开发从入门到放弃(一)

    第1章 章节一 01 内容概要 02 内容回顾 03 路飞学城之加入购物车 04 路飞学城之结算 05 路飞学城之立即支付 06 路飞学城之后续计划 07 Flask框架简介和快速使用 08 FLas ...

  5. Flask框架之功能详解

    1|0浏览目录 配置文件 路由系统 视图 请求相关 响应 模板渲染 session 闪现 中间件 蓝图(blueprint) 特殊装饰器 1|1配置文件 知识点 给你一个路径 "settin ...

  6. flask框架(二):简单的登录demo

    一:main.py # -*- coding: utf-8 -*- # @Author : Felix Wang # @time : 2018/7/3 22:58 from flask import ...

  7. flask框架(一):初入

    1.装饰器回顾 # -*- coding: utf-8 -*- # @Author : Felix Wang # @time : 2018/7/3 17:10 import functools &qu ...

  8. 阻塞队列BlockingQueue 学习

    import java.util.Random; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Time ...

  9. Rhel6-cacti+nagios+ganglia(nginx)配置文档

    (lnmp平台) 系统环境: rhel6 x86_64 iptables and selinux disabled 主机: 192.168.122.185 server85.example.com 1 ...

随机推荐

  1. [TFS]TFS强制删除离职人员签出锁定项的方法

    步骤: 1.连接到TFS数据库服务器的tfsversioncontrol库: 2.查tbl_workspace表,找出那哥们的工作目录, 如select * from tbl_workspace wh ...

  2. xinetd网络(2) 协议头解析

    1:在/etc/xinetd.d下添加配置文件xhttpd service xhttpd { socket_type = stream //每行“=”前后各最多只能有一个空格 protocol= tc ...

  3. 记一次http接口格式摸索

    有一个需求,需要用到内部通讯工具的一个ERP转发接口,虽然有接口文档,但是对中文的编码格式没有提示,中间几经周折,最后才想起来通过F12查看提供的测试接口发送请求时的数据格式来分析,经过解析中文只有被 ...

  4. Linux设置Oracle环境变量

    方法一:直接运行export命令定义变量,该变量只在当前的shell(BASH)或其子shell(BASH)下是有效的,shell关闭了,变量也就失效了,再打开新shell时就没有这个变量,需要使用的 ...

  5. NoSQL学习1

    MongoDB使用C++语言编写的一个基于分布式的文件存储的开源数据库.可以在承受高负载的情况下,保证服务器的性能. MongoDB将数据存储成为一个文档,数据结构有键值对组成.类似于JSON,字段值 ...

  6. 安装JavaFX Scene Builder,并配置到Eclipse

    转载自:https://www.yiibai.com/javafx/install-javafx-scene-builder-into-eclipse.html 1-JavaFX Scene Buil ...

  7. 《算法》第三章部分程序 part 3

    ▶ 书中第三章部分程序,加上自己补充的代码,红黑树 ● 红黑树,大部分方法与注释与二叉树相同 package package01; import java.util.NoSuchElementExce ...

  8. js提高篇

    1定义一个方法 function aa(){alert(this)} 对于浏览器 这只是一个方法,那么this是什么的,this理所当然是document对象了..也就是说 打页面定义的方法 都是do ...

  9. [C基础修炼] [C课程设计]C语言课程设计之图书管理系统

    #include <stdio.h> #include <stdlib.h> #include <string.h> FILE *fp;//定义文件指针fp,指向文 ...

  10. JavaScript:今天是今年第几周?

    用js实现,今天是今年第几周? 基本思路: 1.当前时间 - 今年1月1日0时,拿到时间差(毫秒数) 2.时间差/7天毫秒数,向上取整 var d = new Date('2018-01-01 00: ...