quantum_stack_interview/README.md

977 B
Raw Permalink Blame History

quantum-stack-interview

环境要求

  • Python >= 3.9
  • Docker用于 Redis

安装依赖

推荐使用 uv 进行依赖管理:

uv sync

或使用 pip

pip install -e .

启动 Redis

项目依赖 Redis推荐使用 Docker 启动:

just start_redis

或手动执行:

docker compose -f docker/docker-compose.dev.yaml up -d redis

Redis 默认监听 6379 端口。

启动项目

开发环境下可使用 uvicorn 启动 ASGI 服务:

just run

或手动执行:

uvicorn quantum_stack_interview.asgi:application --reload

访问地址: http://127.0.0.1:8000/

运行测试

pytest

主要功能

  • 商品搜索、创建
  • 批量下单
  • Redis 缓存加速搜索

目录结构

  • shop/ 业务代码(商品、订单等)
  • quantum_stack_interview/ 项目配置
  • docker/ Docker 配置
  • tests/ 测试用例