Interview practice

Python Backend Developer

0–2 years · Junior — Python · Django / Flask / FastAPI · REST APIs · SQL · Celery · Testing

0–2 years 2–5 years 5–8 years 8+ years
technical Debugging 1 of 6
An error occurs intermittently in a production Flask application, but you can't reproduce it in development. What steps do you take to troubleshoot it?
What a strong answer covers

Enables detailed logging to gather more information; reviews error logs for stack traces and context; checks for race conditions in the code; considers environmental differences between production and development; uses monitoring tools to observe application behaviour in production.

The follow-up you would get

What if the logs don't reveal much? What would you try next?

Could you have answered that?
scenario Database migrations 2 of 6
You need to deploy a database migration that alters a large table, but the production environment is under heavy load. What steps do you take?
What a strong answer covers

Evaluates the size and complexity of the migration; considers using a zero-downtime migration strategy; decides on a time window for the deployment; prepares a rollback plan; tests the migration on a staging environment.

The follow-up you would get

If the migration causes a significant slowdown, what immediate actions do you take?

Could you have answered that?
technical API Design 3 of 6
You have a REST API that returns a large dataset, and clients are reporting slow response times. What approaches can you take to improve it?
What a strong answer covers

Evaluates pagination of results to reduce payload size; checks if the API is returning unnecessary fields; considers implementing caching mechanisms like Redis; assesses the efficiency of database queries behind the API.

The follow-up you would get

If you implement pagination, what are some common strategies to handle it?

Could you have answered that?
technical Concurrency 4 of 6
You have a web application that uses Flask, and a request hangs for more than 30 seconds. What steps do you take to diagnose the issue?
What a strong answer covers

Checks the request logs for timestamps; uses a profiler to identify bottlenecks; examines the code for blocking operations; considers whether a resource is locked; evaluates whether using async or threading could alleviate the issue.

The follow-up you would get

You identify a long-running database query. What might cause that?

Could you have answered that?
scenario API versioning 5 of 6
You are tasked with updating a REST API to support a new feature, but it breaks existing client integrations. How do you address this issue in the first 15 minutes?
What a strong answer covers

Identifies the breaking changes and assesses the impact on clients; considers creating a new version of the API; communicates the changes to stakeholders; evaluates options for backward compatibility; suggests a deprecation plan for old versions.

The follow-up you would get

What would you include in the deprecation plan to ensure clients migrate smoothly?

Could you have answered that?
ownership A failure in deployment 6 of 6
Describe a time when a deployment you managed went wrong. What was the impact?
What a strong answer covers

Identifies specific deployment steps taken; explains the resulting issues and their impact on users; clarifies how they communicated the problem; discusses what corrective actions were taken; reflects on lessons learned for future deployments.

The follow-up you would get

What could you have done differently to prevent it?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.