| 1 | Unit 1 | Lec1 | Selectors & I/O | What does the selectors module do in Python? | Easy | 1 | Monitors multiple file descriptors for I/O readiness | Reads and writes data from sockets | Monitors multiple file descriptors for I/O readiness | Manages application timeouts | Creates new TCP connections |
| 2 | Unit 1 | Lec1 | Event Loop | What does asyncio.run_coroutine_threadsafe() do? | Hard | 1 | Submits a coroutine to a running event loop from a different thread and returns a Future | Runs a coroutine synchronously in the current thread | Creates a new event loop for each coroutine | Blocks the current thread until the coroutine finishes | Submits a coroutine to a running event loop from a different thread and returns a Future |
| 3 | Unit 1 | Lec2 | Threading & GIL | For which type of tasks are Python threads still effective despite the GIL? | Medium | 1 | I/O-bound tasks like network requests and file reading | CPU-bound tasks like matrix multiplication | I/O-bound tasks like network requests and file reading | Both CPU-bound and I/O-bound equally | Neither — threads are always inefficient in Python |
| 4 | Unit 1 | Lec3 | HTTP Basics | Which HTTP method is idempotent AND used for creating resources? | Hard | 1 | None — POST creates resources but is NOT idempotent | POST | PATCH | GET | None — POST creates resources but is NOT idempotent |
| 5 | Unit 1 | Lec3 | FastAPI Intro | FastAPI is built on top of which two libraries? | Medium | 1 | Starlette and Pydantic | Flask and Marshmallow | Starlette and Pydantic | Django and DRF | Tornado and Cerberus |
| 6 | Unit 2 | Lec4 | Path Parameters | What does Path(..., gt=0) enforce on a path parameter? | Medium | 1 | The parameter must be an integer greater than 0 | The parameter is optional | The parameter must be a string | The parameter must be an integer greater than 0 | The parameter must be less than 0 |
| 7 | Unit 2 | Lec5 | Request Body | What is the preferred way to define a request body in FastAPI? | Easy | 1 | Using a Pydantic BaseModel class | Using raw dictionaries | Using Body() for each field separately | Using a Pydantic BaseModel class | Using JSON.loads() manually |
| 8 | Unit 2 | Lec5 | Field Validation | How do you add a custom validator to a Pydantic model field? | Medium | 1 | Use @field_validator decorator with @classmethod | Override init() method | Use a try/except block in the endpoint | Use @field_validator decorator with @classmethod | Add validation logic in the route handler |
| 9 | Unit 2 | Lec6 | Cookie Parameters | What does httponly=True do when setting a cookie? | Medium | 1 | Prevents JavaScript from accessing the cookie (server-side only) | Makes the cookie visible only via HTTPS | Allows JavaScript to read the cookie | Encrypts the cookie value | Prevents JavaScript from accessing the cookie (server-side only) |
| 10 | Unit 3 | Lec7 | asyncpg | Why do we wrap database operations in conn.transaction()? | Medium | 1 | To ensure data consistency — if any operation fails the entire batch is rolled back | To improve query speed | To ensure data consistency — if any operation fails the entire batch is rolled back | To enable parallel queries | To compress the data before sending |
| 11 | Unit 3 | Lec8 | SQLAlchemy ORM | In SQLAlchemy 2.0, how do you define a model column with type annotations? | Medium | 1 | id: Mapped[int] = mapped_column(primary_key=True) | Column(Integer, primary_key=True) | db.Column(db.Integer) | id: Mapped[int] = mapped_column(primary_key=True) | id = IntegerField(primary_key=True) |
| 12 | Unit 4 | Lec9 | Dependency Injection | What does Depends() do in FastAPI? | Easy | 1 | Declares a dependency that FastAPI will resolve and inject into the endpoint function | Declares a dependency that FastAPI will resolve and inject into the endpoint function | Creates a new database table | Defines a URL path parameter | Sets the response status code |
| 13 | Unit 4 | Lec10 | CRUD Operations | What does await session.refresh(user) do after a commit? | Hard | 1 | Reloads the user object from the database so it reflects DB-generated values (e.g. auto-increment id) | Deletes the user from the database | Reverts the last commit | Creates a new user with the same data | Reloads the user object from the database so it reflects DB-generated values (e.g. auto-increment id) |
| 14 | Unit 5 | Lec11 | JWT HS256 | What is the difference between HS256 and RS256 JWT algorithms? | Medium | 1 | HS256 uses a single shared secret for both signing and verifying; RS256 uses a private key to sign and a public key to verify | HS256 uses public/private keys; RS256 uses a shared secret | They are identical but with different speeds | HS256 uses a single shared secret for both signing and verifying; RS256 uses a private key to sign and a public key to verify | HS256 is for encryption; RS256 is for signing |
| 15 | Unit 5 | Lec12 | RBAC | How does the require_role() dependency factory enforce RBAC? | Hard | 1 | It extracts user roles from the JWT claims and returns 403 Forbidden if the user lacks the required role | It checks the user's IP address | It validates the request body format | It extracts user roles from the JWT claims and returns 403 Forbidden if the user lacks the required role | It creates new roles in the database |
| 16 | Unit 6 | Lec13 | Async Testing | Why can't TestClient be used for async endpoint testing? | Hard | 1 | TestClient runs synchronously — httpx.AsyncClient is needed to properly test async def endpoints within an async event loop | It doesn't support JSON responses | TestClient runs synchronously — httpx.AsyncClient is needed to properly test async def endpoints within an async event loop | It requires a database connection | It only works with Flask |