sme_json¶
Mapping examinations to and from JSON files.
-
egegrouper.sme_json.
get_exam
(file_name)[source]¶ Get examination object from JSON file.
Parameters: file_name (str) – Name of JSON file. Returns: Examination instance. Return type: sme.Examination
-
egegrouper.sme_json.
put_exam
(e, file_name)[source]¶ Put examination to JSON file.
Parameters: - e (sme.Examination) – Examination instance.
- file_name (str) – File name.
sme_sqlite3¶
Mapping examinations to and from sqlite3 SME database.
-
egegrouper.sme_sqlite3.
get_exam
(conn, exam_id, only_meta=False)[source]¶ Get examination object from database.
Parameters: - conn (sqlite3.Connection) – Opened connection to sqlite3 database.
- exam_id (str) – Examination ID.
- only_meta (bool) – Get only meta data of examination if True.
Returns: Examination instance.
Return type:
-
egegrouper.sme_sqlite3.
put_exam
(conn, exam)[source]¶ Put examination to database.
Parameters: - conn (sqlite3.Connection) – Opened connection with database.
- exam (sme.Examination) – Examination instance.