Back to bricks list
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
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

Brick name : str
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

path : str
Return type : bool
GET_ALL_BRICK_MODELS - @classmethod
Return type : List
GET_BRICK_MODEL - @classmethod
Name : str
Return type : BrickModel
GET_BRICK_SRC_FOLDER - @classmethod

Get the folder of the brick source code

Brick name : str
Return type : str
GET_BRICK_VERSION - @classmethod
Name : str
Return type : str
GET_PARENT_BRICK_FOLDER - @classmethod

Get the parent brick folder of a file or folder path

path : str
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.

Brick name : str
_description_
brick_path : str
_description_
INIT - @classmethod

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

LOG_BRICK_ERROR - @classmethod
obj : Any
message : str
LOG_BRICK_INFO - @classmethod
obj : Any
message : str
LOG_BRICK_MESSAGE - @classmethod
Brick name : str
message : str
Status : Literal
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

obj : Any
obj that caused the message. The brick information will be retrieve form the obj type
message : str
[description]
Status : Literal
[description]
LOG_BRICK_WARNING - @classmethod
obj : Any
message : str
RENAME_BRICK - @classmethod

Rename brick objects and delete brick from settings /!\ This method is not safe and should be used with caution

old_brick_name : str
new_brick_name : str