fix: 🩹 ReadMe Formatting

This commit is contained in:
2025-08-21 07:46:56 +01:00
parent b354081e9f
commit 0bfee11e0e
+17 -17
View File
@@ -6,17 +6,17 @@ A simple REST API that provides random compliments from a YAML file.
## 🚀 Features ## 🚀 Features
✅ Returns a random compliment from a YAML file. ✅ Returns a random compliment from a YAML file.
✅ Health check endpoint for monitoring. ✅ Health check endpoint for monitoring.
✅ Error handling for missing files or malformed YAML. ✅ Error handling for missing files or malformed YAML.
✅ Secure YAML parsing (yaml.safe_load). ✅ Secure YAML parsing (yaml.safe_load).
✅ Easy to deploy with Docker(soon) or local development. ✅ Easy to deploy with Docker(soon) or local development.
--- ---
## 📦 Dependencies ## 📦 Dependencies
Uses UV for environment and package version handling; Uses UV for environment and package version handling:
[uv link](https://docs.astral.sh/uv/) [uv link](https://docs.astral.sh/uv/)
`uv sync` `uv sync`
@@ -28,15 +28,15 @@ Uses UV for environment and package version handling;
Your project should have these files: Your project should have these files:
kind-api/ kind-api/
├── kind_response.yaml # Your YAML file with compliments ├── kind_response.yaml # Your YAML file with compliments
├── main.py # Flask API script ├── main.py # Flask API script
└── README.md # This file └── README.md # This file
--- ---
## 🔧 Configuration ## 🔧 Configuration
1. YAML Format (kind_response.yaml) 1. YAML Format (kind_response.yaml)
Ensure your YAML file follows this structure: Ensure your YAML file follows this structure:
``` ```
@@ -95,14 +95,14 @@ Run the server:
Create a Dockerfile with: Create a Dockerfile with:
FROM python:3.10-slim FROM python:3.10-slim
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN pip install flask pyyaml RUN pip install flask pyyaml
CMD ["python3", "kind_api.py"] CMD ["python3", "kind_api.py"]
Build and run: Build and run:
docker build -t kind-api . docker build -t kind-api .
docker run -p 5000:5000 kind-api docker run -p 5000:5000 kind-api
--- ---