Releases: larsid/covid-api
v1.0.0
Covid-API v1.0.0
This is the first official release of the Covid-API, a simple REST API built with Flask designed to manage user health data and rank users based on the severity of their vital signs.
The application is containerized and configured for automated deployment via GitHub Actions.
Key Features
This initial release includes the following core functionalities:
- User Management (CRUD)
The API provides full CRUD (Create, Read, Update, Delete) operations for users, storing their vital health metrics. All data is managed through an in-memory repository, which is thread-safe.
POST /users: Creates a new user.
Required fields: name, temperature, heart_rate, blood_pressure, respiratory_rate.
GET /users: Retrieves a list of all registered users.
GET /users/int:id: Retrieves a specific user by their ID.
PUT /users/int:id: Updates the information for an existing user.
DELETE /users/int:id: Removes a user from the system.
- Sickness Scoring System
The API's primary feature is its ability to rank users based on their health status.
Health Score: Each user is assigned a "score" calculated automatically based on their vital signs. The score is incremented if vital signs fall outside the normal ranges:
Temperature
Heart Rate
Blood Pressure
Respiratory Rate
GET /users/sickest/int:limit: This endpoint returns a sorted list of users, from sickest to healthiest, based on their calculated health score. The list can be limited by the provided parameter.
- Technical Notes
Storage: The UsersRepository is an in-memory implementation. All data will be lost when the application restarts.
Dependencies: The project runs on Python and uses Flask and Flask-Cors.
CI/CD: A GitHub Actions workflow is included to build and push the Docker image to Docker Hub (larsid/covid-api) automatically when a new version tag (e.g., v1.0.1) is pushed.