class documentation

class ProgramsManager:

Constructor: ProgramsManager(db_path, programs_path)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method create_program Undocumented
Method delete_program Undocumented
Method execute_from_code Undocumented
Method execute_from_id Undocumented
Method exists Undocumented
Method get Retrieve a program by doing a request to the database and by reading the files on the system :param program_id: the wanted program's id :type program_id: str :return: The program information :rtype: ProgramDict...
Method get_all Returns all the programs. This method is costly as it calls the database and the system files multiple times. Prefer using the programs property :return: The programs information :rtype: List[ProgramDict]...
Method stop_execution Undocumented
Method update_program Undocumented
Property execution_is_running Undocumented
Property execution_is_success Undocumented
Property execution_output Undocumented
Property programs Returns the cached programs. This method is more efficient than get_all as it do not directly use the database nor the file :return: The programs information :rtype: List[ProgramDict]
Static Method __execute_in_thread Undocumented
Method __sync_db_with_system Do various checks to ensure the database is synced with the files
Instance Variable __blockly_manager Undocumented
Instance Variable __database Undocumented
Instance Variable __programs Undocumented
Instance Variable __programs_path Undocumented
Instance Variable __python_manager Undocumented
Instance Variable __python_runner Undocumented
def __init__(self, db_path: str, programs_path: str):

Undocumented

def create_program(self, name: str, description: str, python_code: str, blockly_code: str = '') -> str:

Undocumented

def delete_program(self, program_id: str):

Undocumented

def execute_from_code(self, python_code: str, in_thread: bool = True):

Undocumented

def execute_from_id(self, program_id: str, in_thread: bool = True):

Undocumented

def exists(self, program_id: str) -> bool:

Undocumented

def get(self, program_id: str) -> ProgramDict:

Retrieve a program by doing a request to the database and by reading the files on the system :param program_id: the wanted program's id :type program_id: str :return: The program information :rtype: ProgramDict

def get_all(self) -> List[ProgramDict]:

Returns all the programs. This method is costly as it calls the database and the system files multiple times. Prefer using the programs property :return: The programs information :rtype: List[ProgramDict]

def stop_execution(self):

Undocumented

def update_program(self, program_id: str, name: str, description: str, python_code: str, blockly_code: str):

Undocumented

@property
execution_is_running: bool =

Undocumented

@property
execution_is_success: bool =

Undocumented

@property
execution_output: str =

Undocumented

@property
programs: List[ProgramDict] =

Returns the cached programs. This method is more efficient than get_all as it do not directly use the database nor the file :return: The programs information :rtype: List[ProgramDict]

@staticmethod
def __execute_in_thread(method: Callable, *args, **kwargs):

Undocumented

def __sync_db_with_system(self):

Do various checks to ensure the database is synced with the files

__blockly_manager =

Undocumented

__database =

Undocumented

__programs =

Undocumented

__programs_path =

Undocumented

__python_manager =

Undocumented

__python_runner =

Undocumented