Module marksman.models

This module implements a generic class to handle the CRUD operations for 3 different type of data: Students/Exams/Marks

Classes

class Models (db_modelz: DbModelz, pks_fn: dict, values_fn: dict)

Generic class for the three types Student or Exam or MarksEntry

Methods

def create(self) ‑> NoneType

Create a new entry for model

def delete(self) ‑> NoneType

Delete a data entry of current model

def display(self) ‑> NoneType

Displays the data of the model in a beautified fashion

Args

_data : [list], optional
If _data not provided then [self.object] will be used.

Defaults to None. This is done to enhance the functionality of this method. This method can be used to display a single row or multiple rows.

def read(self) ‑> tuple

Read the data using primary key

Returns

tuple or None
Returns a tuple of the data record, if exists else None

Show data from other tables, that is related to current model

def update(self) ‑> NoneType

Update data entry of current model