This project is a Python FastAPI application that provides:
- Employee CRUD operations
- Salary calculation endpoint
- Salary metrics by country
- Salary metrics by job title
All employee records are stored in a SQLite database.
- Python 3.13
- FastAPI
- SQLAlchemy
- SQLite
- Pytest
- Create employee
- List employees
- Get employee by ID
- Update employee
- Delete employee
Given an employee ID, the API calculates deductions and net salary based on country:
- India: 10% TDS
- United States: 12% TDS
- All other countries: no deductions
- Minimum, maximum, and average salary for a given country
- Average salary for a given job title
app/
main.py
database.py
models.py
schemas.py
crud.py
services.py
tests/
conftest.py
test_create_employee.py
test_get_employee.py
test_list_employees.py
test_update_employee.py
test_delete_employee.py
test_salary_calculation.py
test_salary_metrics.py