class_docstr: Wrap a pipeline to easily deploy it to a REST API. Just provide a json encoder and a json decoder.
  
  Usage example:
  
  ```
  class CustomJSONDecoderFor2DArray(JSONDataBodyDecoder):
      '''This is a custom JSON decoder class that precedes the pipeline's transformation.'''
  
      def decode(self, data_inputs: dict):
          values_in_json_2d_arr: List[List[int]] = data_inputs["values"]
          return np.array(values_in_json_2d_arr)
  
  class CustomJSONEncoderOfOutputs(JSONDataResponseEncoder):
      '''This is a custom JSON response encoder class for converting the pipeline's transformation outputs.'''
  
      def encode(self, data_inputs) -> dict:
          return {
              'predictions': list(data_inputs)
          }
  
  app = FlaskRestApiWrapper(
      json_decoder=CustomJSONDecoderFor2DArray(),
      wrapped=Pipeline(...),
      json_encoder=CustomJSONEncoderOfOutputs(),
  ).get_app()
  
  app.run(debug=False, port=5000)
  ```
class_docstr_tok: ["Wrap","a","pipeline","to","easily","deploy","it","to","a","REST","API",".","Just","provide","a","json","encoder","and","a","json","decoder",".","Usage","example",":","``","`","class","CustomJSONDecoderFor2DArray","(","JSONDataBodyDecoder",")",":","``","'This","is","a","custom","JSON","decoder","class","that","precedes","the","pipeline","'s","transformation",".","''","'","def","decode","(","self",",","data_inputs",":","dict",")",":","values_in_json_2d_arr",":","List","[","List","[","int","]","]","=","data_inputs","[","``","values","''","]","return","np.array","(","values_in_json_2d_arr",")","class","CustomJSONEncoderOfOutputs","(","JSONDataResponseEncoder",")",":","``","'This","is","a","custom","JSON","response","encoder","class","for","converting","the","pipeline","'s","transformation","outputs",".","''","'","def","encode","(","self",",","data_inputs",")","-",">","dict",":","return","{","'predictions","'",":","list","(","data_inputs",")","}","app","=","FlaskRestApiWrapper","(","json_decoder=CustomJSONDecoderFor2DArray","(",")",",","wrapped=Pipeline","(","...",")",",","json_encoder=CustomJSONEncoderOfOutputs","(",")",",",")",".get_app","(",")","app.run","(","debug=False",",","port=5000",")","``","`"]
code: def __init__(
      self,
      json_decoder: JSONDataBodyDecoder,
      wrapped: BaseStep,
      json_encoder: JSONDataResponseEncoder,
      route="/",
  ):
      Pipeline.__init__(self, [json_decoder, wrapped, json_encoder])
      self.route: str = route
  
file_path: Neuraxle/neuraxle/rest/flask.py
imports: from abc import ABC, abstractmethod
  import numpy
  from flask import Response
  from neuraxle.base import BaseStep
  from neuraxle.pipeline import Pipeline
label_desc: Use image node_id 1 to create a new FlaskRestApiWrapper object from inherited base classes: Pipeline with example: obj = FlaskRestApiWrapper(json_decoder, wrapped, json_encoder, route)