Code Monkey home page Code Monkey logo

calendar-python's Introduction

Calendar

Introduction

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

Tech Stack

  1. Python as programming language
  2. Flask for api development
  3. Gunicorn as web server
  4. Docker to containerize the application

Salient Features

  1. The above date matrix is 7x6
  2. 100% unit test coverage

JavaScript version of this project: Calendar-JS

Run Application

  1. Install Docker along with Docker Compose
  2. docker compose build
  3. docker compose up -d

Run Tests

  1. Working directory required: Calendar-Python
  2. Run python -m tests.{test-file-name-without-extension}

Check Coverage

  1. Working directory required: Calendar-Python
  2. Run coverage run -m tests.{test-file-name-without-extension}
  3. Run coverage html
  4. Check the generated html file at location htmlcov\index.html

calendar-python's People

Contributors

ashu-tosh-kumar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.