Skip to content

πŸš— The objective of the project is the management of clients and buyers within a car sales page βœ”οΈ, this in order to improve and contribute with the collaborators to improve the development portfolio. Project developed for practice to Senasoft 2021. πŸ§‘β€πŸ’»

Notifications You must be signed in to change notification settings

LuisC111/Senasoft-exercise-cars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flask App

Using Flask to build a Senasoft example.

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.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 the management of clients and buyers within a car sales page βœ”οΈ, this in order to improve and contribute with the collaborators to improve the development portfolio. Project developed for practice to Senasoft 2021. πŸ§‘β€πŸ’»

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published