5 October, version 2 — Python Backend Engineer — prep map
Checklist format: tick what you can explain and defend under questioning, not what you have used. Bold is the primary note; the rest add depth.
Priority: 🔴 required (in the ad’s requirements, will be probed) · 🟡 preferred (likely a question each) · 🟢 preferred, lighter (a sentence is enough)
The ad decoded, your evidence and the gaps are in 5 October, version 2 — Python Backend Engineer, regulated healthcare. Version 1’s prep map covers the shared ground in more depth — databases, integrations, architecture and healthcare.
🔴 Python — “modern type hints, async patterns, and idiomatic project layout”
Type hints
- The everyday vocabulary —
X | None,Callable, built-in generics,Literal,FinalOptional, Union, CallableTypedDict, Literal, FinalAnnotated and TypeGuard - Generics and PEP 695 —
def first[T](...),class Box[T],typealiases, varianceTypeVar and genericsParamSpec and Concatenate - Protocol vs ABC — structural seams for repositories, clients and fakesProtocol and structural typingProtocols and interfaces
- Types as design — illegal states unrepresentable,
assert_never, parse don’t validateType-driven developmentdataclass vs attrs vs PydanticPydantic in practice - Checking in CI — mypy vs pyright, strict mode, adopting it package by packagemypy and pyright strictnessType-checking strategy
Async patterns
- Structured concurrency — TaskGroup vs gather,
ExceptionGroupandexcept*TaskGroup and structured concurrencyanyio and trio - Timeouts and cancellation —
asyncio.timeout(), re-raisingCancelledError,shieldCancellation, timeouts, errors - Bounded concurrency and backpressure — a semaphore in the right place, bounded queuesSynchronization primitivesasyncio.Queue vs threading.QueueAsync optimisation
- Never block the loop — sync libraries to a thread, CPU work to a processBlocking calls in
async defrun_in_executor/to_threadFastAPI and the event loop
Project layout
-
pyproject.tomland the src layout — PEP 621 metadata, tool config in one file, whysrc/pyproject.toml and buildingImports and the module system - uv, environments, lockfiles — declare, resolve, lock, syncpip, Poetry, uvVirtualenvs and lockfilesDependency resolution and supply chain
- Inside the package — organise by feature, thin routes, typed settingsFastAPI project structureClean ArchitectureThe twelve-factor app
- The quality gates — Ruff, mypy, pre-commit, CI as the actual gateLintersFormattersPre-commit and code review
🔴 Web frameworks — “FastAPI, Django, or Flask”
- FastAPI — DI and
dependency_overrides,async defvsdef, Pydantic v2FastAPI overviewDependencies and injectionTesting a FastAPI app - Django and DRF — the ORM, N+1, serializers, the async storyDjango vs DRF
select_relatedvsprefetch_relatedAsync Django - Flask — what it gives you, what you add yourself, when it is the right sizeFlaskWSGI vs ASGI
🔴 APIs — “designing, building, and evolving REST APIs (OpenAPI / Swagger)”
- Evolving without breaking — additive change, tolerant readers, what counts as breakingVersioning and pagination(§ When to bump the version, § Deprecation flow)Contract-first API design
- OpenAPI as the contract — code-first vs contract-first, a spec diff in CIContract-first API designOpenAPI in FastAPIOpenAPI in DRF
- Pagination — cursor vs offset, the response shape, page-size limitsVersioning and pagination(§ Pagination — three styles)
- Error conventions — Problem Details (RFC 9457), one shape everywhereError handling and cachingException handling in FastAPIStatus codes
- The basics, fluently — resources, methods, idempotency, PUT vs PATCHREST principlesIdempotency keysPUT vs PATCH
🔴 Databases — “PostgreSQL or MySQL, migrations, tuning queries”
- Tuning —
pg_stat_statements,EXPLAIN (ANALYZE, BUFFERS), indexes, N+1Reading a query planHow a B-tree index worksWhy your index is not usedN+1 - Migrations — expand/contract,
CONCURRENTLY,NOT VALID,lock_timeout, Alembic and DjangoZero-downtime migrationsAlembicDjango migrations - PostgreSQL vs MySQL — clustered index, transactional DDL, default isolation,
utf8mb4MySQLIsolation anomalies across databases - SQL fluency — joins,
GROUP BY/HAVING, window functions, CTEs; a live task is plausibleWindow functions and CTEsSQL fundamentalsTransactions and isolation
🔴 Testing — “pytest, including unit, integration, and contract tests”
- Contract tests — consumer-driven contracts vs schema checks vs end-to-endIntegration and contract testingContract-first API design(§ Consumer-driven contracts, the other direction)API testing and schemathesis
- Integration tests — testcontainers, rollback per test, the database never mockedIntegration testsSQLAlchemy testing patternsTesting a FastAPI app
- pytest fluency — fixture scopes,
yieldfixtures,conftest.py, parametrize, async testsFixtures deep diveParametrize patternspytest-asyncioHypothesis - Doubles and third parties — stub at the transport, fakes for stateful seamsMocking external APIsTest doubles taxonomy
- Strategy and a healthy suite — pyramid vs trophy, flaky tests, diff coverageTest strategy and the pyramidTest data, flaky tests, CI
🔴 Tooling — “Git, code review, and trunk-based or short-lived-branch workflows”
- Trunk-based development — short-lived branches, feature flags, branch protection, why not GitFlowBranch strategiesProgressive delivery
- The PR workflow — small PRs, descriptions, squash vs merge vs rebase,
--force-with-leasePull request workflowMerge vs rebaseInteractive rebase - Code review — what you look for, labelling blocking vs nitPre-commit and code reviewVersion 1’s spoken answer
- Getting out of trouble — conflicts, reflog, bisect, reset vs revertConflict resolutionReflog recoveryBisectReset, revert, checkout
🟡 Regulated environments — “HIPAA, GDPR, ISO 27001, SOC 2, or medical-device software”
- Controls and evidence — SOC 2 Type I vs II, ISO 27001, controls that emit their own evidenceSOC 2, ISO 27001 and GRCOWASP Top 10
- HIPAA and GDPR — PHI, BAAs, audit logging, minimisation, no PHI in logsPHI, privacy and secure codingVersion 1’s spoken answer
- Validated systems — GxP, Part 11, validation alongside CI/CDGxP and validation
Medical-device software — no note in the corpus, so this is all of it. The standard is IEC 62304, the software lifecycle for medical devices. Each software system gets a safety class by the worst harm a failure could cause — A (no injury possible), B (non-serious injury), C (death or serious injury) — and the class sets how much process applies: documented requirements and architecture, verification, and traceability from each requirement to its tests. Every third-party component is SOUP (software of unknown provenance), listed with its version and assessed against its known anomalies — in Python terms, the lockfile is your SOUP inventory. Risk management runs under ISO 14971. Agile is compatible; the documentation is part of the work, not an afterthought.
🟡 Event-driven — “Kafka, RabbitMQ, SQS, Pub/Sub”
- Queue vs log — which broker for what, and running two side by sideKafka vs RabbitMQEvent-driven architecture
- Kafka — partitions, consumer groups, offsets, delivery semanticsWhat is KafkaDelivery semantics
- RabbitMQ — exchanges, routing, dead-letter exchangesWhat is RabbitMQExchanges, queues and DLX
- SQS, SNS, EventBridge, Step Functions — visibility timeout, FIFO, fan-out, orchestrationSQS visibility timeout and consumersSNSEventBridgeStep Functions
- Pub/Sub — the GCP mappingGCP for an AWS-shaped brain
- Correctness on any broker — at-least-once, idempotent consumers, the outboxThe transactional outboxConsumer idempotency
🟡 Containers — “Docker, Kubernetes”
- A Python image — multi-stage, slim, non-root, layer orderDockerMulti-stage buildsImage layers
- Kubernetes — Deployments and Services, probes, requests and limits, HPA, Gateway APIKubernetes interviewPods, services, deploymentsProbes and HPAGateway API
🟡 Observability — “OpenTelemetry, Datadog, Grafana, Sentry”
- OpenTelemetry — SDK, auto-instrumentation, OTLP, the collectorOpenTelemetryTrace context in async Python
- Sampling and cardinality — head vs tail, and why metrics are never sampledSampling strategiesThe three pillars
- The named tools — Datadog, Grafana with Prometheus, SentryDatadogGrafanaPrometheusSentryChoosing
- Logs that help — structured, a trace id on every line, no PHIStructured loggingSLOs and error budgets
🟡 AI-assisted development — “to accelerate delivery”
- How you use it, and where you don’t — with a failure storyHow do you work with AI tools?What AI tools do you use?How do you apply AI in your work?
- Keeping it safe — tests first, small diffs, CI as the gateTDD with coding agentsAI-assisted development and AI-DLCSpec-driven development
🟡 Performance — “high-throughput or low-latency systems”
- Measure first — p99 rather than the average, profiling with cProfile and py-spyProfiling basicsProduction debuggingMemory profiling
- Where the time goes in a service — the database, blocking calls, serialisation, poolsAsync and performanceConnection poolingWhy Python is slow
- Proving it — load tests, soak tests, latency numbersLoad and performance testingLatency numbersCache stampede
🟡 Shipping — “deploying to AWS, GCP, or Azure through a CI/CD pipeline”
- The pipeline — stages, caching, one image promoted across environmentsPipeline design patternsCI/CD basicsGitHub Actions
- Deploying safely — rolling, blue-green, canary, flags, rollbackDeployment strategiesProgressive delivery
- Secrets and supply chain — OIDC to the cloud, pinned actions, scanned imagesSecrets and supply chainSecrets and configuration
- The clouds — AWS in depth (the resume’s certification invites it), GCP and Azure by mappingAWS interview essentialsGCP for an AWS-shaped brain
🟢 Infrastructure as code — “Terraform, Pulumi, CloudFormation”
- Terraform vs CloudFormation — state, ecosystem, rollback, licensingCloudFormation vs TerraformOpenTofu and licensing
- Terraform in practice — remote state and locking, plan in CI, drift, importTerraform statePlan, apply, drift, importModules
Pulumi — no note in the corpus, so this is all of it. The same declare-preview-apply model as Terraform, written in a general-purpose language — Python, TypeScript, Go — instead of HCL, so loops, functions and unit tests come for free.
pulumi previewis the plan,pulumi upthe apply, a stack is an environment, and state lives in Pulumi Cloud or a backend you run (S3, Azure Blob, GCS). Many providers are bridged from Terraform’s, so coverage is similar. The trade: real code is more powerful, and easier to make too clever.
🟢 Healthcare — “healthcare background, FHIR, HL7”
- FHIR R4 and HL7 v2, honestly — resources, profiles, MLLP, idempotency on message idsHealthcare data standardsVersion 1’s spoken answer
- The data-sensitive bridge — your regulated-finance work, framed for health dataHealthcare and regulated, overviewVersion 1’s evidence
The walk-through to rehearse
“Walk me through how a change gets from your laptop to production.” It covers the ad’s whole tooling line in one answer, and every step is a place they can push. Say it out loud in this order:
- Branch — off
main, short-lived, tests written first — Branch strategies, TDD with coding agents. - Local gates — Ruff, mypy and fast tests through pre-commit — Pre-commit and code review.
- Pull request — small, described, reviewed; CI runs unit tests, integration tests on real Postgres, contract tests and an OpenAPI diff — Pull request workflow, Integration and contract testing.
- Build once — squash-merge to
main; one image, tagged with the commit, pushed to the registry — Pipeline design patterns, Multi-stage builds. - Schema first — migrations backward-compatible, expanded before the code that needs them ships — Zero-downtime migrations.
- Deploy — staging, smoke tests, then production rolling or canary, with risky behaviour behind a flag; infrastructure changes go through a reviewed plan, never from a laptop — Deployment strategies, Plan, apply, drift.
- Watch, and roll back — traces, error rate and latency against the SLO; rollback is redeploying the previous image — OpenTelemetry, SLOs and error budgets.
Then name the failure modes before they ask: a long-lived branch drifting from
main, a migration the old code cannot survive, a flaky test retried until
green, an image rebuilt per environment so staging tested something else, an
infrastructure change applied from a laptop, and patient data slipping into a
new log line.
Behavioural — what this ad asks about you
| Ad line | The question | Draw it from | Notes |
|---|---|---|---|
| shipping production services | “Tell me about your last project.” | the Automation Platform first, Invest Planning for regulated questions | Version 1’s project story |
| AI-assisted development | “How do you use AI tools?” | [your tools, by name] | How do you work with AI tools? · What AI tools do you use? |
| code review | “A review that changed your mind.” | [fill in] | Disagreement with the team · Code review |
| performance | “A performance problem you solved.” | [fill in] | Profiling basics · Load testing |
| CI/CD | “A change that broke production.” | [fill in] | Incident response · A mistake you made |
| regulated environments | “Have you worked under HIPAA, SOC 2…?” | Invest Planning: audit and consent records | SOC 2, ISO 27001 and GRC |
| the preferred list | “Have you used Kafka, Kubernetes, Terraform?” | the honest bridge | Handling not knowing · Approaching new technologies |
- A story for every [fill in] row — code review, performance and a broken deployA mistake you madeDisagreement with the teamThe six signals