Planka Utilities¶
Utility functions for dealing with Planka objects
| CLASS | DESCRIPTION |
|---|---|
PlankaSnapshot |
|
| FUNCTION | DESCRIPTION |
|---|---|
due_in |
Decorated function for use with a ModelList |
board_to_csv |
Write the current board state out to a csv file |
board_to_table |
Get a nested list/table for the board. |
snapshot |
Create a dictionary snapshot of a Planka object. (MUST BE ADMIN) |
PlankaSnapshot
¶
Bases: TypedDict
-
Plankapy v2
Planka Utilities
snapshot
| ATTRIBUTE | DESCRIPTION |
|---|---|
projects |
Project Schemas |
boards |
Board Schemas |
lists |
List Schemas |
cards |
Card Schemas |
card_labels |
Card Label Schemas |
card_memberships |
Card Membership Schemas
TYPE:
|
task_lists |
Task List Schemas |
tasks |
Task Schemas |
base_custom_field_groups |
Base Custom Field Group schemas
TYPE:
|
custom_field_groups |
Custom Field Group Schemas
TYPE:
|
custom_fields |
Custom Field Schemas
TYPE:
|
custom_field_values |
Custom Field Value Schemas
TYPE:
|
comments |
Comment Schemas |
webhooks |
Webhook Schemas |
users |
User Schemas |
board_memberships |
Board Membership Schemas
TYPE:
|
project_managers |
Project Manager Schemas
TYPE:
|
labels |
Label Schemas |
notification_services |
Notificaiton Service Schemas
TYPE:
|
actions |
Action Schemas |
config |
Config Schema
TYPE:
|
card_memberships
instance-attribute
¶
card_memberships: list[CardMembership]
Card Membership Schemas
base_custom_field_groups
instance-attribute
¶
base_custom_field_groups: list[BaseCustomFieldGroup]
Base Custom Field Group schemas
custom_field_groups
instance-attribute
¶
custom_field_groups: list[CustomFieldGroup]
Custom Field Group Schemas
custom_field_values
instance-attribute
¶
custom_field_values: list[CustomFieldValue]
Custom Field Value Schemas
board_memberships
instance-attribute
¶
board_memberships: list[BoardMembership]
Board Membership Schemas
project_managers
instance-attribute
¶
project_managers: list[ProjectManager]
Project Manager Schemas
notification_services
instance-attribute
¶
notification_services: list[NotificationService]
Notificaiton Service Schemas
due_in
¶
Decorated function for use with a ModelList That allows filtering by date
Source code in src/plankapy/v2/utils.py
18 19 20 21 22 23 24 25 26 27 | |
board_to_csv
¶
Write the current board state out to a csv file
Writes out a csv of the board state using list.name and card.name as
the headers and values respectively. Will match visual state of the board.
| PARAMETER | DESCRIPTION |
|---|---|
|
The board to export
TYPE:
|
|
A string or Path to the outpud directory (default: |
|
An optional overrde for the filename (default:
TYPE:
|
Source code in src/plankapy/v2/utils.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
board_to_table
¶
Get a nested list/table for the board.
Uses name attributes of cards and lists
| PARAMETER | DESCRIPTION |
|---|---|
|
The board object to tablify
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[list[str]]
|
A matrix of string lists with the first element being list names |
list[list[str]]
|
and the remaining elements being card names from left to right |
list[list[str]]
|
``` |
list[list[str]]
|
[ ['list1', 'list2'], ['l1 c1', 'l2 c1'], ['l1 c2', 'l2 c2'], ... |
list[list[str]]
|
] |
list[list[str]]
|
``` |
Source code in src/plankapy/v2/utils.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
snapshot
¶
snapshot(planka: Planka) -> PlankaSnapshot
Create a dictionary snapshot of a Planka object. (MUST BE ADMIN) All associated schemas are dumped into a single dictionary.
Note
Since this required traversing all objecs in the system, it can be a very long process. This is best run at a time when not a lot of users are interacting with the board since a 5 minute snapshot could end up with sync errors if state changes over that time.
| RETURNS | DESCRIPTION |
|---|---|
PlankaSnapshot
|
A dictonary with all object schemas. Each top level key is a |
| RAISES | DESCRIPTION |
|---|---|
PermissionError
|
If the logged in user is not an admin |
Source code in src/plankapy/v2/utils.py
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 | |