This project aims to showcase the development of a production grade project. We are building an utility to return calendar for respective month for given input date. We have used Flask
as back-end library and gunicorn
as web server using Python
. We aim not to use any external library for any purpose except very native standard libraries. We have written unit-tests using standard unittest
library.
The application accepts a date string in YYYY-MM-DD
format and returns a calendar for that month filled with previous and/or next month dates to fulfill a 7x6
matrix.
For example, for the input 2022-01-31
, the calendar representation is below:
S M T W T F S
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
- Python as programming language
- Flask for api development
- Gunicorn as web server
- Docker to containerize the application
- The above date matrix is
7x6
- 100% unit test coverage
JavaScript version of this project: Calendar-JS
- Install Docker along with Docker Compose
docker compose build
docker compose up -d
- Working directory required:
Calendar-Python
- Run
python -m tests.{test-file-name-without-extension}
- Working directory required:
Calendar-Python
- Run
coverage run -m tests.{test-file-name-without-extension}
- Run
coverage html
- Check the generated html file at location
htmlcov\index.html