A modern Python microservice built with FastAPI.
- FastAPI for high-performance API development
- Docker containerization
- Testing with pytest
- Environment configuration with dotenv
- Python 3.11+
- Docker (optional)
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run the service:
uvicorn app.main:app --reload
- Access the API at http://localhost:8000
- API documentation at http://localhost:8000/docs
docker build -t python-microservice .
docker run -p 8000:8000 python-microservice
.
├── app/ # Application code
│ ├── api/ # API endpoints
│ ├── core/ # Core functionality
│ ├── models/ # Data models
│ └── main.py # Application entry point
├── tests/ # Test suite
├── .github/ # GitHub Actions workflows
├── Dockerfile # Docker configuration
└── requirements.txt # Python dependencies