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. Android---页面跳转

    1.首先在一个布局文件(.XML)中绘画了一个跳转按钮(id为btn1): <Button         android:id="@+id/btn1"         an ...

  2. word_宏示例

    参考:https://jingyan.baidu.com/article/870c6fc3326588b03fe4beeb.html 内容自适应 Application.Browser.Target ...

  3. Java - 20 Java 继承

    Java 继承 继承是java面向对象编程技术的一块基石,因为它允许创建分等级层次的类.继承可以理解为一个对象从另一个对象获取属性的过程. 如果类A是类B的父类,而类B是类C的父类,我们也称C是A的子 ...

  4. BZOJ2321 [BeiJing2011集训] 星器

    2321: [BeiJing2011集训]星器 Time Limit: 1 Sec  Memory Limit: 128 MB Description Magic Land上的时间又过了若干世纪…… ...

  5. SVG 学习<五> SVG动画

    目录 SVG 学习<一>基础图形及线段 SVG 学习<二>进阶 SVG世界,视野,视窗 stroke属性 svg分组 SVG 学习<三>渐变 SVG 学习<四 ...

  6. SVG 学习<一>基础图形及线段

    目录 SVG 学习<一>基础图形及线段 SVG 学习<二>进阶 SVG世界,视野,视窗 stroke属性 svg分组 SVG 学习<三>渐变 SVG 学习<四 ...

  7. 定位到行的快捷键iOS

    1. 文件 CMD + N: 新文件CMD + SHIFT + N: 新项目CMD + O: 打开CMD + S: 保存CMD + SHIFT + S: 另存为CMD + W: 关闭窗口CMD + S ...

  8. 【转】不联网如何PING通WIN主机和VMWARE

    原文地址:http://www.gqgtpc.com/thread-76838-1-1.html 一般情况下,如果宿主主机的网口连接网线并且能够上网,那么按照VM的默认安装,在VM-Settings- ...

  9. 7.adb安装

    adb的全称为Android Debug Bridge,中文名“调试桥”顾名思义adb命令是调试手机中应用的一种方法,而且作为Android SDK中的工具,其功能非常强大,用这个命令行工具可以直接操 ...

  10. 《算法》第六章部分程序 part 4

    ▶ 书中第六章部分程序,包括在加上自己补充的代码,利用后缀树查找最长重复子串.查找最大重复子串并输出其上下文(Key word in context,KWIC).求两字符串的最长公共子串 ● 利用后缀 ...