使用说明
Python MCP 项目
一个遵循模型-控制器-呈现器(MCP)架构模式的Python项目。
项目结构
mcp_project/
├── README.md
├── requirements.txt
├── src/
│ ├── model/ # Data models and business logic
│ ├── controller/ # Application logic and flow control
│ ├── presenter/ # Presentation layer
│ └── main.py # Application entry point
└── tests/ # Unit and integration tests
设置
-
创建一个虚拟环境:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
安装依赖项:
pip install -r requirements.txt
运行应用程序
python -m src.main
运行测试
python -m pytest tests/
