The purpose of this repository is to make a standard FLASK aplication template to create standard get request able to connect with a postgreSQL database, LOG management and error managenment with EMAIL (Configurated for GMAIL ).
Afther you get a working environment. You can use it and build new webservices.
Has anaconda installed on windows. And configured you system variables ($path) of anaconda on windows:
- C:\ProgramData\Anaconda3
- C:\ProgramData\Anaconda3\Scripts
- C:\ProgramData\Anaconda3\Library\bin
- Clone the github repository.
$ git clone https://github.com/R-Rijnbeek/flask_postgresql_template.git
- Enter the project folder.
$ cd flask_postgresql_template
- Build the virtual environment on the repository by running:
$ build.bat
- To activate the environmet and run the webservice:
$ activate ./env
$ python entrypoint.py
or use your interpreter using the right virtual environment.
Afther that, you can test it writing on your webbrowser: http://127.0.0.1:8080/hello_world?NAME=John getting as output:
{"DATA":{"message":"Hello World John"},"SUCCES":true}
- The dependencies to use all features of this repository are writed on the environmet.yml file
- Future feature: Make the EMAIL content optional
- This repository is tested with windows 10 and anaconda version 4.11.0.
- This is a standard template. You can use it for your purpose to make it easier to build you flask webservice aplication and install or create new features on your local repository.