added rest-API, sqlalchemy and nice structure
This commit is contained in:
28
api/__init__.py
Normal file
28
api/__init__.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from flask import Blueprint
|
||||
from flask_restplus import Api
|
||||
|
||||
api_authorizations = {
|
||||
'apikey': {
|
||||
'type': 'apiKey',
|
||||
'in': 'header',
|
||||
'name': 'X-API-KEY'
|
||||
},
|
||||
'basicAuth': {
|
||||
'type': 'basic',
|
||||
'scheme': 'basic'
|
||||
},
|
||||
'bearerAuth': {
|
||||
'type': 'apiKey',
|
||||
'scheme': 'bearer',
|
||||
'name': 'Authorization',
|
||||
'in': 'header'
|
||||
}
|
||||
}
|
||||
|
||||
api_bp = Blueprint('api', __name__, url_prefix='/api')
|
||||
api_v1 = Api(api_bp, prefix="/v1", version='0.1', title='Vue Test API',
|
||||
description='The Vue Test API', doc='/v1/doc/', authorizations=api_authorizations, security='bearerAuth')
|
||||
|
||||
from .example_api import *
|
||||
Reference in New Issue
Block a user