Git Product home page Git Product logo

test_python's Introduction

Python 示例程序

项目介绍

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

.
├── LICENSE
├── Procfile
├── README.md
├── app.py
├── requirements.txt
├── runtime.txt
├── static
│   ├── css
│   ├── font
│   └── js
└── templates
    └── index.html

项目要求

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

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

requirements.txt 示例:

Flask==1.0.2
gunicorn==19.9.0

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

Procfile 示例:

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

本地测试

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

test_python's People

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.