-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
--- | ||
# Python Flask Template 2023 | ||
|
||
The purpose of this project is to use to play around. It uses pipenv, flask and has its own requirements.txt | ||
|
||
## Clone this repo | ||
|
||
- with an empty folder | ||
- open terminal | ||
- please install git before you continue | ||
- write: ```git clone https://github.com/baylagas/python-flask-template-2023.git``` then press enter | ||
|
||
## Install pipenv | ||
|
||
```bash | ||
pip install pipenv --user | ||
``` | ||
|
||
## Create a new virtual environment | ||
|
||
```bash | ||
pipenv shell | ||
``` | ||
|
||
## Install requirements | ||
|
||
```bash | ||
pipenv install -r requirements.txt | ||
``` | ||
|
||
## Run the project | ||
|
||
```bash | ||
python app.py | ||
``` | ||
|
||
## Usage: play around with your code | ||
|
||
```py | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
|
||
@app.route("/") | ||
def hello(): | ||
return "hello world" | ||
|
||
|
||
if __name__ == "__main__": | ||
app.run(debug=True) | ||
``` |