A minimal FastAPI backend service with multiple demo endpoints and pytest-based tests.
- Python 3.9+
- FastAPI
- Uvicorn
- Pytest
pySkill/
├── app/ # Application code
│ ├── __init__.py
│ └── main.py # FastAPI app and routes
├── tests/ # Test cases
├── scripts/
│ └── test.sh # Test runner script
├── skills/ # Reusable AI workflow docs
├── requirements.txt
└── agent.md # Repository agent instructions (AGENTS.md)
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txtStart the API server from the pySkill directory:
uvicorn app.main:app --reloadDefault URL:
http://127.0.0.1:8000
GET /health->{"status": "ok"}GET /hello->{"message": "hello"}GET /huanglin->{"message": "huanglin"}GET /lastOne->{"message": "lastOne"}GET /wold->{"message": "wold"}
Quick check examples:
curl http://127.0.0.1:8000/health
curl http://127.0.0.1:8000/hello
curl http://127.0.0.1:8000/huanglin
curl http://127.0.0.1:8000/lastOne
curl http://127.0.0.1:8000/woldPreferred command:
bash scripts/test.shAlternative:
python3 -m pytest- Keep route handlers thin and changes minimal, following
agent.md. - Add tests for every new feature under
tests/.