Worksheets
albert.collections.worksheets.WorksheetCollection
Bases: BaseCollection
WorksheetCollection is a collection class for managing Worksheet entities in the Albert platform.
Methods:
Name | Description |
---|---|
get_by_project_id |
Retrieve a worksheet by its project ID. Projects and Worksheets are 1:1 in the Albert platform. |
setup_worksheet |
Setup a new worksheet for a project. |
setup_new_sheet_from_template |
Create a new sheet in the Worksheet related to the specified Project from a template. |
add_sheet |
Create a new blank sheet in the Worksheet with the specified name. |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
Source code in src/albert/collections/worksheets.py
get_by_project_id
Retrieve a worksheet by its project ID. Projects and Worksheets are 1:1 in the Albert platform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id
|
str
|
The project ID to retrieve the worksheet for. |
required |
Returns:
Type | Description |
---|---|
Worksheet
|
The Worksheet object for that project. |
Source code in src/albert/collections/worksheets.py
setup_worksheet
Setup a new worksheet for a project.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id
|
str
|
The project ID to setup the worksheet for. |
required |
add_sheet
|
bool
|
Whether to add a blank sheet to the worksheet, by default False |
False
|
Returns:
Type | Description |
---|---|
Worksheet
|
The Worksheet object for the project. |
Source code in src/albert/collections/worksheets.py
setup_new_sheet_from_template
setup_new_sheet_from_template(
*,
project_id: ProjectId,
sheet_template_id: str,
sheet_name: str,
) -> Worksheet
Create a new sheet in the Worksheet related to the specified Project from a template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id
|
str
|
description |
required |
sheet_template_id
|
str
|
description |
required |
sheet_name
|
str
|
description |
required |
Returns:
Type | Description |
---|---|
Worksheet
|
The Worksheet object for the project. |
Source code in src/albert/collections/worksheets.py
add_sheet
Create a new blank sheet in the Worksheet with the specified name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id
|
str
|
The project ID for the Worksheet to add the sheet to. |
required |
sheet_name
|
str
|
The name of the new sheet. |
required |
Returns:
Type | Description |
---|---|
Worksheet
|
The Worksheet object for the project. |