Projects
albert.collections.projects.ProjectCollection
Bases: BaseCollection
ProjectCollection is a collection class for managing Project entities in the Albert platform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
AlbertSession
|
The Albert session instance. |
required |
Methods:
Name | Description |
---|---|
create |
Create a new project. |
get_by_id |
Retrieve a project by its ID. |
update |
Update a project. |
delete |
Delete a project by its ID. |
list |
List projects with optional filters. |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
Source code in src/albert/collections/projects.py
create
Create a new project.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project
|
Project
|
The project to create. |
required |
Returns:
Type | Description |
---|---|
Optional[Project]
|
The created project object if successful, None otherwise. |
Source code in src/albert/collections/projects.py
get_by_id
update
Update a project.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project
|
Project
|
The updated project object. |
required |
Returns:
Type | Description |
---|---|
Project
|
The updated project object as returned by the server. |
Source code in src/albert/collections/projects.py
delete
delete(*, id: str) -> None
Delete a project by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the project to delete. |
required |
Returns:
Type | Description |
---|---|
None
|
|
Source code in src/albert/collections/projects.py
list
list(
*,
text: str = None,
status: list[str] = None,
market_segment: list[str] = None,
application: list[str] = None,
technology: list[str] = None,
created_by: list[str] = None,
location: list[str] = None,
from_created_at: str = None,
to_created_at: str = None,
facet_field: str = None,
facet_text: str = None,
contains_field: list[str] = None,
contains_text: list[str] = None,
linked_to: str = None,
my_projects: bool = None,
my_role: list[str] = None,
order_by: OrderBy = DESCENDING,
sort_by: str = None,
limit: int = 50,
) -> Iterator[Project]
List projects with optional filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
Search any test in the project. |
None
|
status
|
list[str]
|
The status filter for the projects. |
None
|
market_segment
|
list[str]
|
The market segment filter for the projects. |
None
|
application
|
list[str]
|
The application filter for the projects. |
None
|
technology
|
list[str]
|
The technology filter for the projects. |
None
|
created_by
|
list[str]
|
The name of the user who created the project. |
None
|
location
|
list[str]
|
The location filter for the projects. |
None
|
from_created_at
|
str
|
The start date filter for the projects. |
None
|
to_created_at
|
str
|
The end date filter for the projects. |
None
|
facet_field
|
str
|
The facet field for the projects. |
None
|
facet_text
|
str
|
The facet text for the projects. |
None
|
contains_field
|
list[str]
|
To power project facets search |
None
|
contains_text
|
list[str]
|
To power project facets search |
None
|
linked_to
|
str
|
To pass text for linked to dropdown search in Task creation flow. |
None
|
my_projects
|
bool
|
Return Projects owned by you. |
None
|
my_role
|
list[str]
|
Filter Projects to ones which you have a specific role in. |
None
|
order_by
|
OrderBy
|
The order in which to retrieve items (default is OrderBy.DESCENDING). |
DESCENDING
|
sort_by
|
str
|
The field to sort by. |
None
|
Returns:
Type | Description |
---|---|
Iterator[Project]
|
An iterator of Project resources. |
Source code in src/albert/collections/projects.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|