medcat.storage.schema
Attributes
Exceptions
Inappropriate argument value (of correct type). |
Functions
|
|
|
Saves the schema of a class to the specified file. |
|
Loads the schema for a folder of deserialisable files from the file. |
Module Contents
- medcat.storage.schema.logger
- medcat.storage.schema._CLASS_PATH = 'serialised-class'
- medcat.storage.schema._INIT_PARTS_PATH = 'init-parts'
- medcat.storage.schema.DEFAULT_SCHEMA_FILE = '.schema.json'
- medcat.storage.schema._cls2path(cls)
- Parameters:
cls (Type)
- Return type:
str
- medcat.storage.schema.save_schema(file_name, cls, init_parts)
Saves the schema of a class to the specified file.
- Parameters:
file_name (str) – The file to save to.
cls (Type) – The class in question
list[str] (init_parts) – The parts of the .
init_parts (list[str])
- Return type:
None
- medcat.storage.schema.load_schema(file_name)
Loads the schema for a folder of deserialisable files from the file.
- Parameters:
file_name (str) – The schema file
- Returns:
tuple[str, list[str]] – The class package/name along with the parts needed for initialising.
- Return type:
tuple[str, list[str]]
- exception medcat.storage.schema.IllegalSchemaException(*args)
Bases:
ValueErrorInappropriate argument value (of correct type).
- __init__(*args)
Initialize self. See help(type(self)) for accurate signature.
- class __cause__
exception cause
- class __context__
exception context
- __delattr__()
Implement delattr(self, name).
- __dir__()
Default dir() implementation.
- __eq__()
Return self==value.
- __format__()
Default object formatter.
- __ge__()
Return self>=value.
- __getattribute__()
Return getattr(self, name).
- __gt__()
Return self>value.
- __hash__()
Return hash(self).
- __le__()
Return self<=value.
- __lt__()
Return self<value.
- __ne__()
Return self!=value.
- __new__()
Create and return a new object. See help(type) for accurate signature.
- __reduce__()
- __reduce_ex__()
Helper for pickle.
- __repr__()
Return repr(self).
- __setattr__()
Implement setattr(self, name, value).
- __setstate__()
- __sizeof__()
Size of object in memory, in bytes.
- __str__()
Return str(self).
- __subclasshook__()
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- class __suppress_context__
- class __traceback__
- class args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.