Flask is a lightweight, flexible Python micro-framework, and its interviews test how its minimal core works — routing, the request and application contexts, blueprints for structure, and how you assemble functionality from extensions. Here are the Flask interview questions that actually get asked, with answers. (See also our Python guide.)
Core concepts
- What is Flask, and how does it differ from Django (micro vs batteries-included)?
- How does routing work — the @app.route decorator?
- What is WSGI?
- Handling GET vs POST; request and response objects.
Contexts (the tricky part)
- The application context vs the request context.
- What are
g,current_app,request, andsession? - Why do you sometimes get "working outside of application context" errors?
Structure & extensions
- What are blueprints and why use them?
- Common extensions — Flask-SQLAlchemy, Flask-Login, Flask-RESTful.
- The application factory pattern.
- How do you handle configuration?
How to prepare
Flask rounds probe contexts and structure. Practise explaining the request/app context distinction out loud. Greenroom runs spoken technical interviews that follow up on your reasoning. Pair it with our Python and backend guides.
Frequently asked questions
What are the most common Flask interview questions?
Common Flask questions cover what Flask is and how it differs from Django (micro vs batteries-included), routing with @app.route, the WSGI model, request and response handling, the application context vs request context, g/current_app/request/session, blueprints, common extensions like Flask-SQLAlchemy and Flask-Login, the application factory pattern, and configuration handling.
What is the difference between Flask and Django?
Flask is a lightweight micro-framework that gives you routing and request handling and lets you choose components like the ORM and authentication, offering flexibility and a small footprint. Django is batteries-included with a built-in ORM, admin, authentication and more, offering speed and convention. Flask suits small, custom or microservice apps; Django suits larger, feature-rich applications.
What is the application context in Flask?
The application context tracks application-level data during a request or CLI command, exposing current_app and g, while the request context tracks request-specific data, exposing request and session. Flask pushes these contexts during request handling. 'Working outside of application context' errors happen when you access current_app or g outside an active context, fixed by pushing one with app.app_context().
How should I prepare for a Flask interview?
Focus on Flask's contexts (application vs request), its minimal design philosophy, routing, blueprints and the extension ecosystem, since these distinguish real experience from tutorial knowledge. Practise explaining the context distinction and when you'd use blueprints out loud with a voice-based mock interview that follows up, because Flask rounds are conceptual.