5 October — Senior 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: 🔴 core (in the ad, will be probed) · 🟡 important (in the ad, lighter) · 🟢 breadth (implied by the product)
The ad decoded, your best evidence and the refresh plan are in 5 October, version 1 — Senior Python Backend Engineer, digital healthcare. Spoken versions of the likely questions are in Answers — say these out loud.
🔴 Python at senior depth — “5+ years of commercial experience”
- Concurrency models and the GIL — threads vs processes vs asyncio; free-threading official in 3.14 but opt-inThe GIL and free-threaded PythonCPU-bound vs I/O-boundThreads and processesWhen to use processes
- asyncio internals — the event loop, coroutine vs task vs future,
awaitas a yield pointAsync Python and coroutinesEvent loop internalsasyncio vs threads - Blocking the loop — a sync driver or
bcryptinsideasync def, and how it looks in metricsBlocking calls inasync defFastAPI and the event looprun_in_executor/to_thread - TaskGroup, cancellation, timeouts, backpressureTaskGroup and structured concurrencyCancellation, timeouts, errorsSynchronization primitives
- Memory — refcounting and the cycle collector,
__slots__, why RSS does not dropMemory model and GC__slots__weakrefMemory profiling - The data model —
__eq__/__hash__,isvs==, mutability,__new__vs__init____eq__and__hash__Mutable vs immutableisvs==__init__vs__new__ - Generators, decorators, context managers — be ready to write each one liveIterators and generatorsDecorators and context managersDecorator with arguments
contextlib - Typing — Protocol vs ABC, generics and PEP 695, mypy or pyright in CIProtocol and structural typingTypeVar and genericsmypy and pyright strictness
- What’s new — 3.12 to 3.14, and 3.15 landing this weekWhat’s new in Python 3.12-3.14
- Tricky questions sweep — read the folder once; these get asked verbatimTricky questionsMutable default argumentsLate-binding closures
super()and the MRO
Python 3.15 is not out yet. 3.15.0rc3 shipped on 2 October and the final moved a week, to 9 October 2026, over lazy-import release blockers. Say “3.14 is current, 3.15 lands this week”, then name the headlines: explicit lazy imports (PEP 810), a
frozendictbuilt-in (PEP 814), UTF-8 as the default encoding (PEP 686). The corpus has no 3.15 note yet; the source is the python.org announcement.
🔴 Web frameworks — “modern Python web frameworks”
- FastAPI end to end — Starlette plus Pydantic, lifespan, routers, where it fitsFastAPI overviewProject structureWSGI vs ASGI
- Dependency injection — the per-request cache,
yielddependencies,dependency_overridesDependencies and injectionDependency injection, the patternDI containers -
async defvsdefroutes — where the code runs, the 40-thread pool, why you still need several workersFastAPI and the event looprun_in_threadpoolAsync and performance - Validation, errors, OpenAPI — Pydantic v2, one error shape, the generated contractException handlingPydantic modelsPydantic in practiceOpenAPI and docs
- Background work —
BackgroundTasksvs Celery, and why the first has no durabilityBackgroundTasks vs CeleryAsync I/O and background work - Auth, middleware, deployment — security dependencies, workers, health checksSecurity and authenticationMiddlewareDeployment
- Django and DRF — if their core is Django: ORM, N+1, serializers, migrations, the async storyDjango vs DRF
select_relatedvsprefetch_relatedDRF performance and N+1Django migrationsAsync Django
Ask which framework early — the ad does not name one, so it is a fair question while they describe the project. Answer in FastAPI by default and give the Django equivalent in one clause:
selectinloadisprefetch_related,joinedloadisselect_related, an Alembic revision is a Django migration, a Pydantic model is a DRF serializer.
🔴 REST APIs — “build and maintain REST APIs”
- Resources and URLs — nouns, sub-resources, actions as state changes, why GET must be safeREST principlesRichardson maturity and HATEOASStateful and stateless
- Status codes and methods — 400 vs 422, 401 vs 403, 404 for another tenant, PUT vs PATCHStatus codesPUT vs PATCHHTTP semantics and caching
- Idempotency — which methods are, and making POST retryable with a keyIdempotency keysIdempotencyIdempotent payments
- Pagination, versioning, deprecation — cursor over offset, additive change over new versionsVersioning and paginationContract-first API design
- Errors and HTTP caching — Problem Details, ETag and
If-Matchagainst lost updatesError handling and cachingException handling in FastAPI - Authentication and authorisation — OAuth2 and OIDC, JWT trade-offs, RBAC plus ABACOAuth 2.0 and OpenID ConnectJWT vs sessionJWT pitfallsRBAC and ABAC
- Rate limiting — the algorithms, and 429 with
Retry-AfterRate limiting algorithmsDesign a rate limiter
Problem Details is RFC 9457 now. It obsoleted RFC 7807 in 2023. The error-handling note still cites 7807; naming the current number is a small senior tell.
🔴 Databases — “databases, migrations, and query optimization”
- The optimisation method —
pg_stat_statementsto find,EXPLAIN (ANALYZE, BUFFERS)to understand, one fix, measureReading a query planHow SQL is processed - Indexes — B-tree mechanics, composite column order, partial and covering, the write costHow a B-tree index worksWhy your index is not usedIndex types
- N+1 — detecting it, and the fix in SQLAlchemy and DjangoN+1 query problemLoading strategies
select_relatedvsprefetch_related - Transactions, isolation, locking — Read Committed, lost updates, write skew, optimistic vs
FOR UPDATETransactions and isolation levelsIsolation anomalies across databasesAdvisory locks - Migrations without downtime — expand/contract,
NOT VALIDthenVALIDATE,CREATE INDEX CONCURRENTLY, batched backfills,lock_timeoutZero-downtime migrationsAlembicDjango migrations - Connection pooling — sizing, PgBouncer transaction mode, diagnosing exhaustionConnection poolingSQLAlchemy pooling
- SQLAlchemy 2.0 — session lifecycle, the Unit of Work, async sessions, the classic pitfallsSession lifecycleUnit of Work and identity mapAsync SQLAlchemyCommon pitfalls
- Past one box — read replicas, partitioning, sharding, vacuumSharding and partitioningReplication and consistencyPartition lifecycleVACUUM and autovacuum
- SQL fluency — joins,
GROUP BY/HAVING, window functions, CTEs; a live SQL task is plausibleWindow functions and CTEsSQL fundamentalsSQL vs NoSQL
Have one database war story with numbers. “[The endpoint] took [X] s. The plan showed [a sequential scan / an estimate off by a thousand times / an N+1]. I [added a composite index / rewrote the predicate / used
selectinload] and it went to [Y] ms.” Every database answer lands better attached to it.
🔴 Integrations — “integrate internal and third-party services”
- Integration design — an adapter per provider behind a Protocol, the internal model at the boundary, error mappingDesigning an external API integrationSchema and the internal modelClean-architecture walkthrough
- The client — one
httpxclient per process, auth to the provider, retries only where safeWriting a client for an external APIExternal API authFollow-up questions - Resilience — timeouts first, backoff with jitter, retry budgets, circuit breakers, bulkheads, fallbacksTimeouts, retries and backoffCircuit breakers and bulkheadsFallbacks and degradation
- Webhooks — HMAC over raw bytes, acknowledge fast, dedupe on event id, reconcileWebhooksWebhook ingestion service
- Between internal services — sync or async, REST or gRPC, and the synchronous-chain anti-patternInter-service communicationAPI protocols comparedgRPCInternal SDKs
- Reliable events — the dual-write problem, the transactional outbox, idempotent consumersThe transactional outboxConsumer idempotencyEvent-driven architecture
- Queues and workers — Celery retries,
acks_late, dead-letter queues; RabbitMQ vs KafkaCelery interview questionsCelery retriesDead-letter queueKafka vs RabbitMQ - Multi-step work across services — sagas, compensation, durable stateResilient orchestrationEvent-driven sagaData consistency patterns
Third parties in healthcare have their own shape. Expect EHRs, labs, pharmacies, insurers and identity providers. New ones speak FHIR R4 over REST, hospitals still speak HL7 v2 over MLLP, and both resend on timeout — so idempotency keyed on the message id is not optional. See Healthcare data standards. Your own integrations are the bridge: Salesforce and the OAuth2 services on the Automation Platform, and the auth, CRM and messaging clients on the Invest Planning Platform.
🔴 Testing — “write unit and integration tests”
- Strategy — pyramid vs trophy, behaviour over implementation, risk-driven, diff coverageTest strategy and the pyramidTest data, flaky tests, CI
- Integration tests on real dependencies — testcontainers, a transaction rolled back per testIntegration and contract testingIntegration testsSQLAlchemy testing patterns
- Testing the API —
TestClientvshttpx.AsyncClient,dependency_overrides, the real databaseTesting a FastAPI apppytest-asyncioTesting DRF - Third parties in tests — stub at the transport, recorded fixtures, contract checks for driftMocking external APIsTest doubles taxonomyMock vs MagicMock vs patch
- pytest fluency — fixture scopes,
yieldfixtures,conftest.py, parametrize, property testsFixtures deep divepytest conceptsParametrize patternsHypothesis
🔴 Architecture and scale — “scalable Python backend services”
- Structuring a service — thin routes, services, repositories; the dependency ruleClean ArchitectureLayered architectureHexagonalRepository and Unit of Work
- Monolith vs microservices — modular monolith first, the microservices tax, strangler figMonolith vs microservicesMicroservices interviewDomain-driven design
- Scaling a stateless service — twelve-factor, horizontal scale, the database as the ceilingThe twelve-factor appAsync and performanceLoad balancing and CDNCapacity estimation
- Caching — cache-aside, TTL with jitter, stampedes, invalidationWhat is RedisCache stampedeRedis patterns in Python
- CQRS and event sourcing — when they pay off, and why an audit requirement is the honest reasonCQRS and event sourcingEvent-driven microservices
- Multi-tenancy — if the platform serves many clinics or countries from one deploymentMulti-tenant isolation
- The vocabulary — SOLID, dependency inversion, composition over inheritanceSOLID principlesDependency inversionComposition over inheritance
🟡 Decisions and review — “architectural decisions and code reviews”
- Making and recording a decision — options, trade-offs, reversibility, ADRsArchitecture decision recordsLeading technical directionDisagreement with the team
- Code review — what you look for, labelling blocking vs nit, PR sizePre-commit hooks and code reviewLeading a team(§ Code review is where most of your leverage is)
- Tech debt — making the business case for paying it downTech debt and complexityAdvocating for tech debtRefactoring
- Tooling that holds the bar — Ruff, mypy, pre-commit, CI as the actual gateLintersType-checking strategyCI/CD basics
🟡 Production — “support production services”
- Observability — logs, metrics, traces; RED; a trace id across async code and queuesThe three pillarsObservability in practiceTrace context in async PythonOpenTelemetry
- Logging and error tracking — structlog, Sentry, and keeping patient data out of bothStructured loggingSentryPHI and secure coding(§ Technical controls that actually get checked)
- SLOs and alerting — alert on symptoms, error budgets, burn rateSLO, SLI, SLA and error budgetsPrometheusGrafana
- Incidents — mitigate first, roles, runbooks, blameless postmortemsIncident response and postmortemsProduction debugging
- Shipping safely — rolling, blue-green, canary, feature flags, migrations in the deploy orderDeployment strategiesProgressive deliveryProbes and HPA
🟡 Healthcare — “a digital healthcare project”, “millions of patients”
- What changes with patient data — HIPAA, GDPR special category, BAAs, the EU AI ActPHI, privacy and secure codingHealthcare and regulated, overviewSOC 2 and ISO 27001
- The controls that get checked — encryption, per-request authorisation, an append-only audit log, minimisation, no PHI in logs or URLsPHI, privacy and secure coding(§ Technical controls that actually get checked)RBAC and ABAC(§ The audit requirement)OWASP Top 10
- Data standards — FHIR R4 resources and profiles, HL7 v2, LOINC / SNOMED / ICD-10, OMOPHealthcare data standards
- International data — residency, cross-border transfer, de-identification for analyticsPII, privacy and the EU AI Act(§ Data residency)PHI, privacy and secure coding(§ De-identification)
- Regulated change — GxP, Part 11, why “no destructive updates” shapes the schema; only if they are in life sciencesGxP and validationCQRS and event sourcing
The three things that catch engineers out, from the healthcare overview: a BAA constrains tool choice before you write any code; audit logging is a functional requirement with years of retention, not observability; and regulated records are never destructively updated.
🟢 AI in the product — “a platform using AI”
- A model is an unreliable third-party dependency — timeouts, retries, fallbacks, pinned versions, costProvider abstraction and resilienceLLM file-processing pipelineInference basics
- Patient data and models — a BAA with no retention, de-identification, or inference inside your own boundaryPHI, privacy and secure coding(§ LLMs on clinical data)PII, privacy and the EU AI ActGovernance and responsible AI
- Knowing it works — evaluation sets, monitoring, driftBuilding eval setsMonitoring and driftLLM observability
- Clinical documents — if they mention summarisation, extraction or searchClinical document intelligenceWhat is RAG
🟢 Delivery — Docker, CI/CD, Kubernetes, cloud
- A Python service in a container — multi-stage, slim base, non-root, layer cachingDockerMulti-stage buildsImage layersCompose
- CI/CD as the quality gate — pipeline stages, secrets, supply chainPipeline design patternsGitHub ActionsSecrets and supply chain
- Kubernetes basics — probes, HPA, scaling workers on queue depthKubernetes interviewProbes and HPAKubernetes basics
- AWS — the resume lists the Solutions Architect Associate certification, so expect AWS questions; your last project ran on Lambda, Step Functions, DynamoDB, API Gateway, ECS and CognitoAWS interview essentialsSecrets and configuration
🟢 Live coding — in case
- Python-flavoured tasks — a retry decorator, an LRU cache, a rate limiter, grouping and dedup with dictsAlgorithms and data structuresCounting and dedup
bisect,heapq,dequefunctools - The patterns that cover most screens — two pointers, sliding window, intervals, binary searchTwo pointersSliding windowMerge and sweep intervalsBinary search variants
- Complexity of the built-ins — what
incosts on a list, a set and a dictCollection complexity
The design question to rehearse
“Design a service that receives patient data from partner clinics, runs it through an AI model, and shows clinicians the results through a REST API.” It touches every line of the ad. Walk it in this order, out loud:
- Clarify — volume and peaks, how fresh results must be, which partners and formats, which countries the data may live in — Interview framework, Capacity estimation.
- Ingest — a webhook or FHIR endpoint that verifies the signature, stores the raw payload append-only, dedupes on the partner’s message id with a unique constraint, and answers in milliseconds — Webhooks, Healthcare data standards.
- Normalise at the boundary — an adapter per partner maps into one internal model, so partner shapes never leak inward — Integration design, Schema and the internal model.
- Hand off reliably — an outbox row in the same transaction; workers call the model with timeouts, retries on transient errors, idempotency on the record id, and a dead-letter queue — The transactional outbox, Timeouts, retries and backoff.
- Serve — results in Postgres with the indexes the read API needs, cursor pagination, authorisation per record, and every read of patient data in the audit log — Indexes, Versioning and pagination, RBAC and ABAC.
- Operate — one trace id from webhook to worker to API, SLOs on freshness and errors, an alert on the oldest unprocessed record, logs with no PHI — Trace context in async Python, SLOs.
- Test — adapter tests on recorded partner payloads, integration tests on real Postgres, a scheduled contract check against each partner’s sandbox — Integration and contract testing.
Then name the failure modes before they ask: a partner resending after a
timeout, a model call with no timeout holding a worker forever, PHI in a log
line or a Sentry traceback, an index built without CONCURRENTLY locking the
results table mid-deploy, a cache key without the tenant serving one clinic’s
data to another, and an outbox relay that died quietly.
Behavioural — the responsibilities, as stories
Every responsibility line comes back as a question. One story per row, with a number in it where you can; the spoken skeletons are in The call — everything except the technical answers.
| Ad line | The question | Draw it from | Notes |
|---|---|---|---|
| ownership, design to production | “A feature you owned end to end.” | a workflow or integration on the Automation Platform, or an Invest Planning service through to Sentry | Strongest project · Working independently |
| integrate third-party services | “Your hardest integration.” | Salesforce and the OAuth2 services on the Automation Platform, or the Invest Planning API clients (auth, CRM, messaging) | Most challenging part · Integration design |
| architectural decisions | “A decision you drove, and what it cost.” | [fill in] | Leading technical direction · ADRs |
| code reviews | “A disagreement in review.” | [fill in] | Code review · Disagreement |
| support production | “Your worst production incident.” | [fill in] | Incident response · A mistake you made |
| mentor | “Someone you helped grow.” | [fill in] | Mentoring and feedback · Leading a team |
| distributed team | “How you work across time zones.” | [fill in] | Joining an existing project · Ambiguity |
- A story for every [fill in] row — your resume has no evidence for them, and the ad names every oneMentoring and feedbackLeading technical directionA mistake you made
- The six signals — the frame every answer is scored againstThe six signalsHandling not knowing
- Your questions, and the red flags in your own answersClosing questions and red flags