Architectural Patterns implementation by using notification handler module prototype

Overview

Architectural Patterns implementation by using notification handler module prototype

Patterns Covered in this code
  • Adapter
  • Indirection
  • Singleton
  • Factory
  • Mediator
About the code

This project implements the required patterns in required scenario by fetching the dummy data from the database.

The required patterns are implemented based on the scenario of sending notification alerts to the different users based on the preference of the method of receiving the notification tols by the users.

Student and teacher classes are controlled by the by respective controller classes and then notification mediator and other classes handles other things.

Restrictions about the code

Currently, only the teacher can send notification to the students and this process uses only semester number which is shared by both the students and the teachers. Meaning that a will currently teach only a specific semester. You can add data dummy data in the sqlite database file directly by using any editor that supports the functionality.

About Error Handling of the Code

As this code will be later plugged into other code so the error handling is done by raising Exception() class exception. Later these exceptions can be replaced by the respective classes.

How to run this code
  • The driver class for this code is teacher_controller.py

  • This code requires some configurations to run, so they need to be added correctly in config.json our code provides a sample file with the sample required values named as config_sample.json

  • You need to do the above step according to the values in the database but sample config file currently contains correct data according to current database file and for now the db file name can only be changed by changing code file

  • This code can be run in two ways. First by python >= 3 (needs to be installed) by using following command in the same directory as the code

    python ./teacher_controller.py

  • The other way this code can be run is by using the docker install by clicking on it if not

  • First build the image by using following command in the same directory as code

    docker build . [IMAGE_NAME]

    Replace image name with any name you like but convention is using [DOCKER_ID]/[IMAGE_NAME]

  • The docker image will use docker volume to mount all the to the docker container, so you do not have to rebuild the image every time.

  • While staying in the same folder as the code run

    Windows

    docker run -v ${PWD}:/patterns [IMAGE_NAME]

    replace the [IMAGE_NAME] with your built image name

    Linux/Mac

    docker run -v "$(pwd)":/patterns [IMAGE_NAME]

  • If you need to change id or message then just run docker run app again as told in above point

You might also like...
Prototype application for GCM bias-correction and downscaling

dodola Prototype application for GCM bias-correction and downscaling This is an unstable prototype. This is under heavy development. Features Nothing!

Developing a python based app prototype with KivyMD framework for a competition :))

Developing a python based app prototype with KivyMD framework for a competition :))

Terminal compatible with ansi-bbs. Meant to be a prototype, but published because why not.
Terminal compatible with ansi-bbs. Meant to be a prototype, but published because why not.

pybbsterm: Terminal emulator for calling BBSs. Use cases (non-exhaustive) Explore terminal protocols. Connect to BBSs. Highlights Python 3.8+ code. Bu

A prototype COG-based tile server for sparse Mars datasets

Mars tiler Mars Tiler is a prototype web application that serves tiles from cloud-optimized GeoTIFFs, with an emphasis on supporting planetary dataset

What Do Deep Nets Learn? Class-wise Patterns Revealed in the Input Space

What Do Deep Nets Learn? Class-wise Patterns Revealed in the Input Space Introduction: Environment: Python3.6.5, PyTorch1.5.0 Dataset: CIFAR-10, Image

A collection of design patterns and idioms in Python (With tests!).

Python Patterns Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayP

Analyzes crypto candles over a set time period and then trades based on winning patterns found

patternstrade Analyzes crypto candles over a set time period and then trades based on winning patterns found. Heavily customizable. Warning: This was

Discovering local read-level DNA methylation patterns and DNA methylation heterogeneity in intermediately methylated regions

Discovering local read-level DNA methylation patterns and DNA methylation heterogeneity in intermediately methylated regions

Module for remote in-memory Python package/module loading through HTTP/S

httpimport Python's missing feature! The feature has been suggested in Python Mailing List Remote, in-memory Python package/module importing through H

Owner
Muhammad Umair
Muhammad Umair
Penelope Shell Handler

penelope Penelope is an advanced shell handler. Its main aim is to replace netcat as shell catcher during exploiting RCE vulnerabilities. It works on

null 293 Dec 30, 2022
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
An optional component handler for hikari, inspired by discord.py's views.

hikari-miru An optional component handler for hikari, inspired by discord.py's views.

null 43 Dec 26, 2022
In this project, we are going to display the battery notification and the time left for the battery to drain out using the battery capacity value.

In this project, we are going to display the battery notification and the time left for the battery to drain out using the battery capacity value.

Ritoban Biswas 1 Dec 20, 2021
Write Streamlit apps using Notion! (Prototype)

Streamlit + Notion test app Write Streamlit apps using Notion! ☠️ IMPORTANT: This is just a little prototype I made to play with some ideas. Not meant

Thiago Teixeira 22 Sep 8, 2022
Implementation of the Angular Spectrum method in Python to simulate Diffraction Patterns

Diffraction Simulations - Angular Spectrum Method Implementation of the Angular Spectrum method in Python to simulate Diffraction Patterns with arbitr

Rafael de la Fuente 276 Dec 30, 2022
OnTime is a small python that you set a time and on that time, app will send you notification and also play an alarm.

OnTime Always be OnTime! What is OnTime? OnTime is a small python that you set a time and on that time, app will send you notification and also play a

AmirHossein Mohammadi 11 Jan 16, 2022
🤖️ Plugin for Sentry which allows sending notification via DingTalk robot.

Sentry DingTalk Sentry 集成钉钉机器人通知 Requirments sentry >= 21.5.1 特性 发送异常通知到钉钉 支持钉钉机器人webhook设置关键字 配置环境变量 DINGTALK_WEBHOOK: Optional(string) DINGTALK_CUST

null 1 Nov 4, 2021
A water drinking notification every hour to keep you healthy while coding :)

Water_Notification A water drinking notification every hour to keep you healthy while coding. ?? ?? Stay Hydrated Stay Healthy ?? ?? Authors @CrazyCat

Arghya Banerjee 1 Dec 22, 2021
Moji sends text and fun facts from different APIs wit da use of a notification deamon

Moji sends text and fun facts from different APIs wit da use of a notification deamon. Can be runned via dmenu or rofi.

kshly 2 Jan 12, 2022