Skip to content

Sample application written using Python Flask with Helm deployment and CI/CD configured

License

Notifications You must be signed in to change notification settings

atsikham/flask-app

Repository files navigation

Helloworld app

Verified environment

K8s cluster: 1.18.15-gke.1501

Database: PostgreSQL 13 (Google Cloud SQL)

System diagram

System Diagram

API

Constraints: <username> must contain only letters. YYYY-MM-DD must be a date before the today date.

Request Response Description

PUT /hello/<username>

{
  "dateOfBirth": "YYYY-MM-DD"
}

204 No Content

Saves/updates the given user’s name and date of birth in the database

GET /hello/<username>

200 OK

If username’s birthday is in N days:

{
  "message": "Hello, <username>! Your birthday is in N day(s)"
}

If username’s birthday is today:

{
  "message": "Hello, <username>! Happy birthday!"
}

Returns hello birthday message for the given user