Back to bricks list
Introduction
Technical Documentation
Other Classes
BrickService
Version

BrickService

Functions

FIND_BRICK_FOLDER - @classmethod

Find the folder of the brick by searching in the user bricks folder and the system bricks folder

Parameters:
NameTypeDefault valueDescription
brick_namestr
Return type:
str
FOLDER_IS_BRICK - @classmethod

return true if the provided folder is a brick. If the folder contains a settings.json and a src folder it is a brick

Parameters:
NameTypeDefault valueDescription
pathstr
Return type:
bool
GET_ALL_BRICK_MODELS - @classmethod
Return type:
List
GET_BRICK_MODEL - @classmethod
Parameters:
NameTypeDefault valueDescription
namestr
Return type:
BrickModel
GET_BRICK_SRC_FOLDER - @classmethod

Get the folder of the brick source code

Parameters:
NameTypeDefault valueDescription
brick_namestr
Return type:
str
GET_BRICK_VERSION - @classmethod
Parameters:
NameTypeDefault valueDescription
namestr
Return type:
str
GET_PARENT_BRICK_FOLDER - @classmethod

Get the parent brick folder of a file or folder path

Parameters:
NameTypeDefault valueDescription
pathstr Path to a file or folder
Return type:
Optional
IMPORT_ALL_BRICKS_IN_PYTHON - @classmethod
IMPORT_BRICK_IN_PYTHON - @classmethod

Method to load a brick from path in python.

Parameters:
NameTypeDefault valueDescription
brick_namestr _description_
brick_pathstr _description_
INIT - @classmethod

Clear the BrickModel table and log all the messages that were waiting on start

LOG_BRICK_ERROR - @classmethod
Parameters:
NameTypeDefault valueDescription
objAny
messagestr
LOG_BRICK_INFO - @classmethod
Parameters:
NameTypeDefault valueDescription
objAny
messagestr
LOG_BRICK_MESSAGE - @classmethod
Parameters:
NameTypeDefault valueDescription
brick_namestr
messagestr
statusLiteral
LOG_BRICK_MESSAGE_FROM_OBJ - @classmethod

Log a message for the brick of the object. The message is save in DB so it can be viewed later

Parameters:
NameTypeDefault valueDescription
objAny Obj that caused the message. the brick information will be retrieve form the obj type
messagestr [description]
statusLiteral [description] brickmessagestatus
LOG_BRICK_WARNING - @classmethod
Parameters:
NameTypeDefault valueDescription
objAny
messagestr