Project¶
| CLASS | DESCRIPTION |
|---|---|
Project |
Python interface for Planka Projects |
Project
¶
Project(schema: Schema, session: Planka)
Bases: PlankaModel[Project]
Python interface for Planka Projects
- Plankapy v2
-
Plankapy v2
models
Custom Field Group
CustomFieldGroupmake_base_group
| METHOD | DESCRIPTION |
|---|---|
add_project_manager |
Add a User to the Project as a ProjectManager |
copy |
Create a deepcopy of the model and its associated schema. |
create_base_custom_field_group |
Create a BaseCustomFieldGroup in the Project |
create_board |
Create a new Board in the Project |
delete |
Delete the Project |
diff |
Get a schema diff between two model schemas. |
import_board |
Import a board from a file (currently supports trello imports only) |
remove_background |
Reset the Project background to the default grey |
remove_project_manager |
Remove a ProjectManager from the Project |
update |
Update the Project |
update_background_image |
Update the Project Background Image, |
| ATTRIBUTE | DESCRIPTION |
|---|---|
__formatter__ |
Formatter func that allows overriding str behavior for models
TYPE:
|
background_gradient |
Gradient background for the project
TYPE:
|
background_image |
The current BackgroundImage of the Project
TYPE:
|
background_images |
Get BackgroundImages associated with the Project
TYPE:
|
background_type |
Type of background for the project
|
base_custom_field_groups |
Get BaseCustomFieldGroups associated with the Project
TYPE:
|
board_memberships |
Get BoardMemberships associated with the Project
TYPE:
|
boards |
Get Boards associated with the Project |
created_at |
When the project was created
TYPE:
|
custom_fields |
Get CustomFields associated with the Project
TYPE:
|
description |
Detailed description of the Project
TYPE:
|
favorite |
Whether the project is in the current User's favorites
TYPE:
|
hidden |
Whether the project is hidden
TYPE:
|
name |
Name/title of the Project
TYPE:
|
notification_services |
Get NotificationServices associated with the Project
TYPE:
|
owner |
The User who owns the project (Raises LookupError if the User cannot be found)
TYPE:
|
project_managers |
Get project manager Users associated with the Project
TYPE:
|
updated_at |
When the project was last updated
TYPE:
|
users |
Get Users associated with the Project |
Source code in src/plankapy/v2/models/_base.py
30 31 32 33 34 35 36 | |
__formatter__
class-attribute
instance-attribute
¶
__formatter__: ModelFormatter[Self] = DEFAULT_FORMATTER
Formatter func that allows overriding str behavior for models
background_gradient
property
writable
¶
background_gradient: BackgroundGradient | None
Gradient background for the project
background_image
property
writable
¶
background_image: BackgroundImage | None
The current BackgroundImage of the Project
background_images
property
¶
background_images: list[BackgroundImage]
Get BackgroundImages associated with the Project
base_custom_field_groups
property
¶
base_custom_field_groups: list[BaseCustomFieldGroup]
Get BaseCustomFieldGroups associated with the Project
board_memberships
property
¶
board_memberships: list[BoardMembership]
Get BoardMemberships associated with the Project
custom_fields
property
¶
custom_fields: list[CustomField]
Get CustomFields associated with the Project
notification_services
property
¶
notification_services: list[NotificationService]
Get NotificationServices associated with the Project
owner
property
¶
owner: User | None
The User who owns the project (Raises LookupError if the User cannot be found)
project_managers
property
¶
project_managers: list[ProjectManager]
Get project manager Users associated with the Project
add_project_manager
¶
add_project_manager(user: User) -> ProjectManager
Add a User to the Project as a ProjectManager
Source code in src/plankapy/v2/models/project.py
183 184 185 | |
copy
¶
copy() -> Self
Create a deepcopy of the model and its associated schema.
Note
Since the endpoints for both instances of the Model are the same, any calls to update will restore the state and bring both copies into sync. copies like this are meant more for comparing changes when running a sync or update/assignemnt operation.
Example:
>>> card_copy = card.copy()
>>> card.name = 'Updated Name'
>>> card_copy.name
'Original Name'
>>> card.name
'Updated Name'
>>> # This update may have had side effects
>>> print(card_copy.diff(card))
{'name': ('Original Name', 'Updated Name'), 'updatedAt': ('...2:00pm', '...2:45pm'), ...}
Source code in src/plankapy/v2/models/_base.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
create_base_custom_field_group
¶
create_base_custom_field_group(*, name: str) -> BaseCustomFieldGroup
Create a BaseCustomFieldGroup in the Project
| PARAMETER | DESCRIPTION |
|---|---|
|
The name of the new BaseCustomFieldGroup
TYPE:
|
Source code in src/plankapy/v2/models/project.py
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
create_board
¶
Create a new Board in the Project
| PARAMETER | DESCRIPTION |
|---|---|
|
The name of the Board
TYPE:
|
|
The position of the board within the project
TYPE:
|
Source code in src/plankapy/v2/models/project.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
delete
¶
delete() -> None
Delete the Project
Source code in src/plankapy/v2/models/project.py
179 180 181 | |
diff
¶
diff(other: PlankaModel[Schema]) -> Diff
Get a schema diff between two model schemas.
Note
Only matching keys are diffed. Any schema keys that are not in the source schema will not be checked in the target schema
Source code in src/plankapy/v2/models/_base.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
import_board
¶
import_board(*, name: str, import_file: bytes, position: Position | int = 'top', import_type: BoardImportType = 'trello', request_id: str | None = None) -> Board
Import a board from a file (currently supports trello imports only)
| PARAMETER | DESCRIPTION |
|---|---|
|
The name of the imported Board
TYPE:
|
|
The position of the imported Board within the Project
TYPE:
|
|
The type of the Bord import (currently
TYPE:
|
|
An optional request ID for tracking upload progress (default:
TYPE:
|
Source code in src/plankapy/v2/models/project.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
remove_background
¶
remove_background() -> None
Reset the Project background to the default grey
Source code in src/plankapy/v2/models/project.py
256 257 258 | |
remove_project_manager
¶
remove_project_manager(project_manager: ProjectManager | User) -> None
Remove a ProjectManager from the Project
Source code in src/plankapy/v2/models/project.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
update
¶
update(**project: Unpack[Request_updateProject]) -> None
Update the Project
Source code in src/plankapy/v2/models/project.py
175 176 177 | |
update_background_image
¶
update_background_image(background: BackgroundImage | Path | str | bytes | None) -> BackgroundImage | None
Update the Project Background Image,
Only Admins and ProjectManagers can update the Background Image
| PARAMETER | DESCRIPTION |
|---|---|
|
Existing Image or filepath/url or raw bytes or None to unset
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
BackgroundImage | None
|
If a backround image was set or created |
Source code in src/plankapy/v2/models/project.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |