|
20 | 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
21 | 21 | # SOFTWARE. |
22 | 22 |
|
| 23 | +"""Main entry point when executing this application as a WSGI app |
| 24 | +""" |
| 25 | + |
23 | 26 | import sys |
24 | 27 | import os |
25 | 28 | import pkg_resources |
|
31 | 34 | from flask_marshmallow import Marshmallow |
32 | 35 | from flask_oidc import OpenIDConnect |
33 | 36 |
|
34 | | - |
35 | 37 | __version__ = pkg_resources.get_distribution('mrmat-python-api-flask').version |
36 | 38 | db = SQLAlchemy() |
37 | 39 | ma = Marshmallow() |
|
62 | 64 |
|
63 | 65 |
|
64 | 66 | def create_app(config_override=None, instance_path=None): |
65 | | - """ |
66 | | - Factory method to create a Flask app. |
| 67 | + """Factory method to create a Flask app. |
67 | 68 |
|
68 | 69 | Allows configuration overrides by providing the optional test_config dict as well as a `config.py` |
69 | 70 | within the instance_path. Will create the instance_path if it does not exist. instance_path is meant |
@@ -109,10 +110,10 @@ def create_app(config_override=None, instance_path=None): |
109 | 110 | # |
110 | 111 | # Import and register our APIs here |
111 | 112 |
|
112 | | - from mrmat_python_api_flask.apis.healthz import bp as api_healthz |
113 | | - from mrmat_python_api_flask.apis.greeting.v1 import api_greeting_v1 |
114 | | - from mrmat_python_api_flask.apis.greeting.v2 import api_greeting_v2 |
115 | | - from mrmat_python_api_flask.apis.resource.v1 import api_resource_v1 |
| 113 | + from mrmat_python_api_flask.apis.healthz import bp as api_healthz # pylint: disable=import-outside-toplevel |
| 114 | + from mrmat_python_api_flask.apis.greeting.v1 import api_greeting_v1 # pylint: disable=import-outside-toplevel |
| 115 | + from mrmat_python_api_flask.apis.greeting.v2 import api_greeting_v2 # pylint: disable=import-outside-toplevel |
| 116 | + from mrmat_python_api_flask.apis.resource.v1 import api_resource_v1 # pylint: disable=import-outside-toplevel |
116 | 117 | app.register_blueprint(api_healthz, url_prefix='/healthz') |
117 | 118 | app.register_blueprint(api_greeting_v1, url_prefix='/api/greeting/v1') |
118 | 119 | app.register_blueprint(api_greeting_v2, url_prefix='/api/greeting/v2') |
|
0 commit comments