Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mxmeinhold/flask-gunicorn-demo
A small template repo for quickly getting started with flask and gunicorn (as well as some other suggestions)
https://github.com/mxmeinhold/flask-gunicorn-demo
Last synced: about 2 months ago
JSON representation
A small template repo for quickly getting started with flask and gunicorn (as well as some other suggestions)
- Host: GitHub
- URL: https://github.com/mxmeinhold/flask-gunicorn-demo
- Owner: mxmeinhold
- License: mit
- Created: 2020-05-05T23:18:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-01T00:25:20.000Z (about 4 years ago)
- Last Synced: 2023-03-02T01:42:01.140Z (almost 2 years ago)
- Language: Python
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask wsgi bootstrap/demo
This demo shows the use of gunicorn with flask.
It includes a basic Dockerfile, a linting demonstration using Pylint, and a Travis CI configuration for running linting.This is not an in depth guide in how these tools work, but a basic starting point and reference.
Make sure to change my name and email if you use this template, especially in the license.
## Setup
Locally running this application should be pretty simple.1. (optional) Use a virtualenv
* Why use a venv? It isolates your dependencies and helps prevent version conflicts with other projects or system dependencies.
1. `python3 -m venv venv` will create a venv in a directory named venv
2. `source ./venv/bin/activate` will activate the venv
2. Install dependencies
* `pip install -r requirements.txt`
3. Run the app
* `gunicorn demo:APP --bind=localhost:5000`
4. Visit localhost:5000 in your web browser.## Linting
This demo uses pylint.
Travis CI will automatically run pylint on commits and PRs, but you can also run pylint manually, using `pylint demo`.
The pylint_quotes plugin is loaded by [the pylintrc](./.pylintrc) and will ensure standardised quotation mark formats.