Flask Interview Questions
Upasana | July 24, 2020 | 2 min read | 1,246 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
-
How will you write a simple Flask API for hello world
-
How will you implement caching in Flask API
-
How to return a JSON response form a Flask API
-
What is virtual environment in python? How does it help in Flask API development?
-
What is Blueprints in Flask API development? Create a blueprint based Flask API
-
Protecting Flask API endpoint with Basic Authentication
-
How to create environment specific configuration (dev, qa, prod)
-
How to call external web service from a Flask API
-
How to access gcloud data store from Flask App
Deployment
-
Is Flask’s WSGI Werkzeug development server suitable for production deployment? Why not?
-
How will you deploy a flask microservice to production?
-
What is WSGI?
-
How will you use Gunicorn server for production deployment?
-
What is containerization? What is docker?
-
How will you create a simple docker image using gunicorn server for a flask API?
-
Complete end to end tutorial for Flask API deployment in production environment.
Logging & Monitoring
-
How to handle all exceptions at a common place?
-
How to add logs to the API calls?
-
How to measure time for API calls using generic approach
Testing
-
How will you write a unit test for Flask REST API
-
How to achieve load testing for Flask API
-
How to write integration tests for Flask API?
Top articles in this category:
- Top 100 interview questions on Data Science & Machine Learning
- Google Data Scientist interview questions with answers
- Part 3: Dockerize Flask application and build CI/CD pipeline in Jenkins
- Part 2: Deploy Flask API in production using WSGI gunicorn with nginx reverse proxy
- Python coding challenges for interviews
- AWS Lambda Interview Questions for Developers
- Blueprints in Flask API Development