Skip to content
tezvyn:

Python & FastAPI

Python, Django, FastAPI, Flask, async Python

110 bites

Test yourself: Top 30 intermediate Python & FastAPI interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Intermediate everything in Python & FastAPI, page 6

FastAPI: Automatic Interactive API Docs
intermediate2 min read

FastAPI: Automatic Interactive API Docs

FastAPI turns your Python type hints into live, interactive API documentation. It generates an OpenAPI schema to power a UI where you can test endpoints directly from your browser, no extra work needed.

FastAPI Response Models: Shape Your API's Output
intermediate2 min read

FastAPI Response Models: Shape Your API's Output

A FastAPI response_model defines your API's output shape, acting as a data filter and automatic documentation generator. Use it to prevent data leaks and provide clear schemas.

FastAPI: Pydantic for Robust Request Bodies
intermediate2 min read

FastAPI: Pydantic for Robust Request Bodies

A Pydantic model is a contract for your API's request body. It tells FastAPI what data to expect, automatically converting incoming JSON into a typed Python object. Use this for any POST or PUT endpoint. The footgun is declaring path params in the body model.

Python's async/await: Concurrent, Not Parallel
intermediate2 min read

Python's async/await: Concurrent, Not Parallel

async/await lets a single Python thread juggle multiple tasks, pausing one to work on another while it waits for I/O. It's ideal for network requests or database queries. The footgun: it won't speed up CPU-bound tasks, it only helps with waiting.

Python Coroutines: Functions You Can Pause and Resume
intermediate2 min read

Python Coroutines: Functions You Can Pause and Resume

A Python coroutine is a function that can be paused and resumed. It yields control during I/O waits, allowing other tasks to run instead of blocking the program. The main footgun: calling an async function does nothing; you must await it to run it.

The `with` Statement: Python's Automatic Cleanup Crew
intermediate2 min read

The `with` Statement: Python's Automatic Cleanup Crew

A context manager is Python's automatic cleanup crew. It uses the with statement to guarantee setup and teardown code runs, even if errors occur. It's essential for files and database connections.

Python's `yield`: Functions That Pause and Resume
intermediate2 min read

Python's `yield`: Functions That Pause and Resume

Python's yield creates a generator: a pausable function that produces values on-demand, saving memory. Use it for large files or infinite sequences. The footgun: a generator is a one-time-use iterator; you can't loop over it twice.

Python Decorators: Functions that Wrap Functions
intermediate2 min read

Python Decorators: Functions that Wrap Functions

A decorator is a function that wraps another function, adding behavior without modifying the original code. They're used for caching, logging, or access control. The main footgun is forgetting that decorators run at definition time, not call time.

Top 10 FastAPI interview questions for senior roles
easy2 min read

Top 10 FastAPI interview questions for senior roles

FastAPI interview questions rarely test syntax. They probe whether you understand its three pillars: ASGI powered async concurrency, Pydantic validation at the request boundary, and the Depends dependency injection graph that wires services together.

Async SQLAlchemy 2.0: the mental model that clicks
intermediate2 min read

Async SQLAlchemy 2.0: the mental model that clicks

SQLAlchemy's async layer bridges its synchronous ORM internals to asyncio. Use AsyncSession and AsyncEngine with an async driver, and await database work. Prerequisites: Python asyncio and basic SQLAlchemy ORM; lazy relationships must be loaded explicitly to avoid implicit I/O errors.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles