- FastAPI application with the following endpoints:
POST /meanto compute the mean of a list of numbersPOST /stddevto compute the population standard deviationGET /healthfor service health checks
- Pydantic-based request validation with custom validation for non-empty lists
- Structured logging
- Rounding of responses to 3 decimal places
- Dockerfile for containerizing the application
- Docker Compose configuration for local orchestration
- Environment variable support via
.env - Runtime configuration using
PORTenvironment variable run.shscript for building and running the container
- Pytest test suite covering:
- Accurate endpoints
- Error handling
- Virtual environment (
venv) support for local development - Clean
.ignorefiles for Python and Docker artifacts - Dependency management via
requirements.txt
- Comprehensive
README.mdincluding:- Setup instructions
- API usage examples
- Environment configuration
- Design decisions and assumptions