Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linder3hs/intro-flask-silabuz
Template flask
https://github.com/linder3hs/intro-flask-silabuz
flask python
Last synced: 12 days ago
JSON representation
Template flask
- Host: GitHub
- URL: https://github.com/linder3hs/intro-flask-silabuz
- Owner: linder3hs
- Created: 2022-11-14T23:58:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-17T23:58:15.000Z (about 2 years ago)
- Last Synced: 2023-03-04T16:13:48.371Z (almost 2 years ago)
- Topics: flask, python
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask docs
Doc for setting up Flask
## Setup
### Install Python
Install Python 3.10
### Install pip
```bash
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
```### Install Flask
```bash
pip install Flask
```### Install virtualenv
Virtualenv una herramienta para crear entornos virtuales de Python. Esto es útil para aislar las dependencias de un proyecto de las dependencias de otros proyectos.
```bash
pip install virtualenv
```### Crear una maquina virtual
```bash
virtualenv venv --python=python3.10
```### Activar la maquina virtual
```bash
source venv/bin/activate
```- windows
```bash
venv\Scripts\activatevenv/Scripts/activate.ps1
```### Varaible Flask
Unix
```bash
export FLASK_APP=app.py
export FLASK_DEBUG=1
```window
```bash
set FLASK_APP=app.py
set FLASK_DEBUG=1
```### Run
```bash
flask run
```### End virtualenv
```bash
deactivate
```### Requirements
Si han clonado un proyecto de github y quieren instalar las dependencias, pueden usar el archivo requirements.txt
```bash
pip install -r requirements.txt
```