chain of responsibility pattern it wasn' me --shaggy"it wasn' meweb apps are complex beasts they need to interpret incoming requests and decide what should be done with them when you think about creating framework to help you build web apps more quicklyyou stand very real chance of drowning in the complexity and options involved with such project python is home to many web framework since the language is popular among developers of cloud applications in this we are going to explore one component of web frameworks called the middleware layer the middleware sits in the middlebetween the client making requests of the app and the actual application it is layer that both the requests from the client and the responses from the main application functions need to pass through in the middlewareyou can do things like log incoming requests for troubleshooting you can also add some code to capture and save the response from the app that goes back to the user oftenyou will find code to check the user' access and whether they should be allowed to execute the request they are making on the system you might want to translate the incoming request body into data format that is easy to handleor escape all input values to protect the system from hackers injecting code into the app you could also think of the routing mechanism of the app as part of the middleware the routing mechanism determines what code should be used to respond to requests directed at specific endpoint (cwessel badenhorst badenhorstpractical python design patterns