From 647e7f5f64daf29f96ec354e93f7f3687a265efe Mon Sep 17 00:00:00 2001 From: vky Date: Thu, 27 Jan 2022 20:59:00 +0100 Subject: [PATCH] started environment --- src/bootstraparse/modules/environment.py | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/bootstraparse/modules/environment.py diff --git a/src/bootstraparse/modules/environment.py b/src/bootstraparse/modules/environment.py new file mode 100644 index 0000000..3672044 --- /dev/null +++ b/src/bootstraparse/modules/environment.py @@ -0,0 +1,34 @@ +# Module for containing super important variables + + +class environment(): + """ + Object containing all the important variables, + with appropriate getters and setters. + Also contains self integrity checks. + """ + + def __init__(self): + # mandatoryParameters + self.mParams = { + 'config': None, + 'context_mngr': None, + 'export_mngr': None, + 'global_path': None, + 'user_path': None, + 'logging': None, + } + + # secondaryParameters + self.sParams = { + + } + + # Set all parameters to uninitialised + self.wasInitialised = {p: False for p in self.mParams} + + def integritycheck(self): + for value in self.wasInitialised.values(): + if value is False: + return False + return True