January 2018
Intermediate to advanced
366 pages
9h 7m
English
In import views.py, the highlight dependencies file is due to the import of ClusterRpcProxy. This dependency comes from the Nameko framework and will provide us with a connection to the other microservices:
import os import json import itertools from flask import Blueprint, jsonify, request from nameko.standalone.rpc import ClusterRpcProxy
After the imports, we will write the instance of Blueprint to determine the routes and also the message broker access URI using Advanced Message Queuing Protocol (AMPQ):
news = Blueprint('news', __name__)
CONFIG_RPC = {'AMQP_URI': os.environ.get('QUEUE_HOST')}
The first route is the one that searches the data by ID. Note that, two parameters should be passed to the ...
Read now
Unlock full access