Python Flask Interview Questions

Carvia Tech | September 18, 2019 | 1 min read | 1 views | Flask - Python micro web framework


Here we will cover top interview questions for Python Flask Micro web framework - API development, Deployment in production, logging and monitoring and testing

API Development

  1. How will you write a simple Flask API for hello world

  2. How will you implement a singleton design pattern in Flask

  3. How will you implement caching in Flask API

  4. How to return a JSON response form a Flask API

  5. What is virtual environment in python? How does it help in Flask API development?

  6. Introduction to Flask for REST API development

  7. What is Blueprints in Flask API development? Create a blueprint based Flask API

Deployment

  1. Is Flask’s WSGI Werkzeug development server suitable for production deployment? Why not?

  2. How will you deploy a flask microservice to production?

  3. What is WSGI?

  4. How will you use Gunicorn server for production deployment?

  5. What is containerization? What is docker?

  6. How will you create a simple docker image using gunicorn server for a flask API?

  7. Complete end to end tutorial for Flask API deployment in production environment.

  8. Docker containerization tutorial for Flask API

Logging & Monitoring

  1. How to handle all exceptions at a common place?

  2. How to add logs to the API calls?

  3. How to measure time for API calls using generic approach

Testing

  1. How will you write a unit test for Flask REST API

  2. How to achieve load testing for Flask API

  3. How to write integration tests for Flask API?


Top articles in this category:
  1. Top 100 interview questions on Data Science & Machine Learning
  2. Python coding challenges for interviews
  3. Google Data Scientist interview questions with answers
  4. Part 3: Dockerize Flask application and build CI/CD pipeline in Jenkins
  5. Part 2: Deploy Flask API in production using WSGI gunicorn with nginx reverse proxy
  6. Write a program to check if the given word is Isogram & Pair isogram in python
  7. Pass the ball game: NxN matrix in python



Find more on this topic:
Machine Learning image
Machine Learning

Data science, machine learning, python, R, big data, spark, the Jupyter notebook, and much more

Last updated 1 week ago


Recommended books for interview preparation:

This website uses cookies to ensure you get the best experience on our website. more info