/example-python-flask-rest-api

Barebones with no auth and some basic endpoints implemented, these are the remains of a project where I had to match the implementation of a NodeJS + Express REST API, hence the typos, bad naming on routes, other useful endpoints are missing and there's an overall lack of logic behind the endpoints

Primary LanguagePythonApache License 2.0Apache-2.0

Instrucciones

Crear entorno virtual (python3-venv)

# Solo una vez, por si no existe 
python3 -m venv .venv

Activar entorno virtual (python3-venv)

# Siempre que no esté activo el entorno virtual
source .venv/bin/activate

Instalar dependencias

pip install -r requirements.txt

Ejecutar en modo debug

flask run --debug --host=127.0.0.1 --port 4000

Ejecutar en modo produccion

# $ waitress-serve --port=<port> <module>:<app>
waitress-serve --port=4000 app:app

Desactivar entorno virtual

deactivate