October 2018
Beginner to intermediate
736 pages
17h 39m
English
Defining the JSONFileDataObject abstract class starts with a standard ABCMeta metaclass specification, and some class-level attributes for various purposes:
class JSONFileDataObject(BaseDataObject, metaclass=abc.ABCMeta):
"""
Provides baseline functionality, interface requirements, and
type-identity for objects that can persist their state-data as
JSON files in a local file-system file-cache
"""
###################################
# Class attributes/constants #
###################################
_file_store_dir = None
_file_store_ready = False
_loaded_objects = None
Where:
_file_store_dir is a default file system directory specification that will eventually need to be read from a configuration file in the ...