Update block docs for: block_installation.md

This commit is contained in:
Bently
2025-01-12 11:53:23 +00:00
parent 9518ff4f02
commit 61bfbeeb01

View File

@@ -0,0 +1,35 @@
## Block Installation
### What it is
A specialized tool designed for developers to add new blocks to the system through code verification and installation.
### What it does
This block serves as a management tool that allows for the verification and installation of new blocks into the system. It takes Python code as input, verifies its structure and validity, and then installs it as a new functional block if all checks pass.
### How it works
The block follows a systematic process:
1. Receives the code for a new block
2. Checks if the code contains a valid block class definition
3. Verifies if the code includes a proper unique identifier (UUID)
4. Creates a new file with the provided code
5. Tests the functionality of the new block
6. Either confirms successful installation or removes the file if there are any errors
### Inputs
- Code: The complete Python code for the new block that needs to be installed. This should include all necessary class definitions, methods, and a unique identifier.
### Outputs
- Success: A confirmation message indicating that the block has been successfully installed and tested
- Error: A detailed error message if the installation fails, including both the problematic code and the specific error encountered
### Possible use case
A developer creates a new custom block for data processing and needs to add it to the system. They can use the Block Installation block to:
1. Submit their block's code
2. Verify that it meets all system requirements
3. Install it safely with proper error handling
4. Confirm it's working as intended
### Important Note
This block is primarily intended for development purposes and should be used with caution as it allows for remote code execution on the server. It comes disabled by default as a security measure.