1 | from flask import Flask, Blueprint |
||
0 ignored issues
–
show
The import
flask could not be resolved.
This can be caused by one of the following: 1. Missing DependenciesThis error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands. # .scrutinizer.yml
before_commands:
- sudo pip install abc # Python2
- sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use
the command for the correct version.
2. Missing __init__.py filesThis error could also result from missing ![]() |
|||
2 | from .resources import HelloWorld, ModelVersion, Predict |
||
3 | import flask.ext.redis |
||
0 ignored issues
–
show
The import
flask.ext.redis could not be resolved.
This can be caused by one of the following: 1. Missing DependenciesThis error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands. # .scrutinizer.yml
before_commands:
- sudo pip install abc # Python2
- sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use
the command for the correct version.
2. Missing __init__.py filesThis error could also result from missing ![]() |
|||
4 | import flask.ext.restful as flask_restful |
||
0 ignored issues
–
show
The import
flask.ext.restful could not be resolved.
This can be caused by one of the following: 1. Missing DependenciesThis error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands. # .scrutinizer.yml
before_commands:
- sudo pip install abc # Python2
- sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use
the command for the correct version.
2. Missing __init__.py filesThis error could also result from missing ![]() |
|||
5 | |||
6 | |||
7 | api_bp = Blueprint("api", __name__) |
||
8 | api = flask_restful.Api(api_bp) |
||
9 | |||
10 | |||
11 | api.add_resource(HelloWorld, "/helloworld") |
||
12 | api.add_resource(ModelVersion, "/model_version<int:version>") |
||
13 | api.add_resource(Predict, "/predict") |
||
14 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.