FastAPI
中等
面试题库
FastAPI
中等
如何配置 --workers、--loop(uvloop)与 --http(httptools)?
FastAPI
困难
为什么 Gunicorn + UvicornWorker 是常见组合?与纯 uvicorn 多进程有何区别?
FastAPI
中等
uvicorn 的 worker 数量如何确定?CPU 核数与 IO 密集如何权衡?
FastAPI
简单
生产环境为什么不能只用 uvicorn app:app --reload 直接跑?
FastAPI
中等
如何测试中间件与生命周期事件(startup/shutdown)?
FastAPI
困难
TestClient 的事件循环与 anyio 在测试中如何处理?如何测试需要数据库的异步视图?
FastAPI
中等
如何 mock 外部服务(如第三方 API)在 FastAPI 测试中的应用?
FastAPI
困难
如何测试依赖中抛出的 HTTPException 与全局异常处理器?
FastAPI
中等
如何用 pytest fixture 组织 FastAPI 测试?如何隔离测试数据库?
FastAPI
中等
如何测试 WebSocket 端点与流式响应?
FastAPI
中等