How To Create A Web Server In Python Using Flask

mainLet’s say you’ve built an interesting Python application that runs locally on your machine. Great! Now how can you make that application usable as a service or an API? A lot of times, people build many services that need to play well together to build a final application. An obvious solution to this is to build a web server like Django that can host your application and handle all the incoming requests. But building a full fledged web server seems like an overkill, especially when you are dealing with lightweight services that only need a couple of functionalities. This is where Flask comes into picture! Flask is a Python microframework that can be used to build web servers and create web applications. How do we do that? How do we build a server that can handle different types of requests?   Continue reading