Building End to End REST APIs in Flask and Connexion
onlinejudge95 |
Description:
With the advent of the cloud, APIs are emerging to expose web services. REST is a logical choice for building APIs that allow users to connect and interact with cloud services. A RESTful API explicitly takes advantage of HTTP methodologies defined by the RFC 2616
protocol. With flask
already holding the center stage for developing web services in the Python
ecosystem, how good it would be if we can use flask
to build REST APIs and expose our web service through them.
We will implement a Service that would act as a bot for introducing new members in a Github organization. We will write our server using flask
and provide REST APIs for clients with connexion
(using swagger specifications) to interact with. We will write unit tests for our APIs and try to improve their code coverage. After we have finished finalizing our codebase, we would dockerize it(if time permits we can try minimizing our docker image's size).
Basic Outline of the talk
- We will start with an overview of what REST is.
- A brief introduction of
flask
and it's structural overview. - How to code specification driven
APIs
. Unit testing
our APIs.- Improving our
code quality
. - Dockerizing our app for deployment.
Who is this talk for
- Python web developers.
- Developers who build services that need to be consumed by multiple clients.
- Anyone interested in exposing their web services through REST APIs.
Key Takeaways
- Implementing a REST API in Flask.
- Unit testing our APIs to make the deployment smoother.
Prerequisites:
Knowledge of Python3 is required(remember to bid farewell to python 2.x).
Basic knowledge of Docker
Speaker Info:
I work as a Dev-Ops engineer in Amazon.in and have over 2 years of experience in Web Services. Graduated in 2017 from Kamla Nehru Institute of Technology with a Bachelor's degree in Computer Science and Engineering. Developing and consuming my own APIs for almost a year now. I prefer a raspberry pi over the cloud to host my home-scale services for personal use. In my free time, I prefer stargazing. Currently working on combining the power of python to solve amateur astronomy problems.