Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Python 10 questions

Web Development (Flask, Django, FastAPI Basics)

Build modern web backends in Python. Compare lightweight Flask routes, robust Django models, and fast asynchronous APIs in FastAPI.

More Python
Interview questions 1–10 of 10
1

What is Flask and how do you create a basic Flask application?

Flask is a lightweight, micro web framework for building web applications in Python. It's easy to learn and pe...

Read answer →
2

What is Django and what is the Django project structure?

Django is a full-featured, batteries-included web framework for rapid development and clean design. It follows...

Read answer →
3

What is FastAPI and what are its advantages?

from fastapi import FastAPI, HTTPException from pydantic import BaseModel from typing import List app = FastA...

Read answer →
4

How do you handle routing and URL patterns in web frameworks?

# Flask routing from flask import Flask app = Flask(__name__) # Basic route @app.route('/home') def home():...

Read answer →
5

How do you work with templates in web frameworks?

# Flask templates with Jinja2 from flask import Flask, render_template app = Flask(__name__) @app.route('/he...

Read answer →
6

How do you work with databases using ORM in web frameworks?

# Django ORM from django.db import models from django.utils import timezone class User(models.Model): use...

Read answer →
7

How do you implement authentication and authorization?

# Django authentication from django.contrib.auth import authenticate, login, logout from django.contrib.auth.m...

Read answer →
8

How do you build RESTful APIs with Python frameworks?

# Flask-RESTful from flask import Flask from flask_restful import Api, Resource, reqparse app = Flask(__name_...

Read answer →
9

What is middleware and how do you use it?

# Flask middleware from flask import Flask, request, g import time app = Flask(__name__) # Request/response...

Read answer →
10

How do you deploy Python web applications to production?

# Using Gunicorn (WSGI server) # Install: pip install gunicorn # Run: gunicorn -w 4 -b 0.0.0.0:8000 app:app #...

Read answer →