Skip to content

The objective of the project is to manage shifts and assign them within an interactive calendar, this in order to improve and contribute with collaborators to improve the development portfolio. Project developed for Senasoft edition 2021. http://mediflow.herokuapp.com

Notifications You must be signed in to change notification settings

LuisC111/Senasoft-2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask App

Using Flask to build a Senasoft Exercise.

Integration with Flask-restplus, Flask-Cors, Flask-Testing, Flask-SQLalchemy,and Flask-OAuth extensions.

Extension:

Installation

Install with pip:

$ pip install -r requirements.txt

Flask Application Structure

.
|──────app/
| |────__init__.py
| |────api/
| | |────__init__.py
| | |────cve/
| | |────user/
| | |────oauth/
| |──────config.Development.cfg
| |──────config.Production.cfg
| |──────config.Testing.cfg
| |────dao/
| |────model/
| |────oauth/
| |────util/
|──────run.py
|──────tests/

Flask Configuration

Example

app = Flask(__name__)
app.config['DEBUG'] = True

Configuring From Files

Example Usage

app = Flask(__name__ )
app.config.from_pyfile('config.Development.cfg')

cfg example


##Flask settings
DEBUG = True  # True/False
TESTING = False


....


Builtin Configuration Values

SERVER_NAME: the name and port number of the server.

JSON_SORT_KEYS : By default Flask will serialize JSON objects in a way that the keys are ordered.

OAuth Setup

add your client_id and client_secret into config file.

ESDAO Setup

add your ES host and ES port into config file

Run Flask

Run flask for develop

$ python webapp/run.py

In flask, Default port is 5000

Swagger document page: http://127.0.0.1:5000/

Run flask for production

Run with Docker

$ docker build -t flask-example .

$ docker run -p 5000:5000 --name flask-example flask-example 
 

In image building, the webapp folder will also add into the image

Reference

Offical Website

Tutorial

Wiki Page

Changelog

  • Version 2.3 : add dockerfile
  • Version 2.2 : add ESDAO module
  • Version 2.1 : add OAuth extension: FLASK-OAuth, and google oauth example
  • Version 2.0 : add SQL ORM extension: FLASK-SQLAlchemy
  • Version 1.1 : update nosetest
  • Version 1.0 : basic flask-example with Flask-Restplus, Flask-Tesintg

About

The objective of the project is to manage shifts and assign them within an interactive calendar, this in order to improve and contribute with collaborators to improve the development portfolio. Project developed for Senasoft edition 2021. http://mediflow.herokuapp.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published