medcat.storage.schema
Classes:
Functions:
-
load_schema–Loads the schema for a folder of deserialisable files from the file.
-
save_schema–Saves the schema of a class to the specified file.
Attributes:
DEFAULT_SCHEMA_FILE
module-attribute
DEFAULT_SCHEMA_FILE = '.schema.json'
IllegalSchemaException
IllegalSchemaException(*args)
Bases: ValueError
Source code in medcat-v2/medcat/storage/schema.py
61 62 | |
load_schema
Loads the schema for a folder of deserialisable files from the file.
Parameters:
-
(file_namestr) –The schema file
Returns:
-
tuple[str, list[str]]–tuple[str, list[str]]: The class package/name along with the parts needed for initialising.
Source code in medcat-v2/medcat/storage/schema.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
save_schema
Saves the schema of a class to the specified file.
Parameters:
-
(file_namestr) –The file to save to.
-
(clsType) –The class in question
-
–init_parts list[str]The parts of the .
Source code in medcat-v2/medcat/storage/schema.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |