Giter VIP home page Giter VIP logo

flask's Introduction

Python 示例程序

项目介绍

本项目是一个使用 Flask 框架编写的简单的 Python 示例程序, 目录结构:

.
├── Procfile
├── README.md
├── hello.py
├── runtime.txt
└── requirements.txt

项目要求

项目必须使用 Pip 来解决依赖,如果项目目录下没有 requirements.txt 文件,你必须创建一个,否则项目将无法部署。

小提示:可以使用 pip freeze > requirements.txt 命令生成 requirements.txt 文件

requirements.txt 示例:

Flask==0.9
Jinja2==2.7.2
Werkzeug==0.8.3
gunicorn==19.0.0

要想应用可以跑起来,还需要一个 Procfile 文件,里面指定应用的启动命令。

Procfile 示例:

web: gunicorn hello:app --log-file - --access-logfile - --error-logfile -

本地测试

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
gunicorn hello:app

flask's People

Contributors

golangav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.