Board Membership¶
| CLASS | DESCRIPTION |
|---|---|
BoardMembership |
Python interface for Planka BoardMemberships |
BoardMembership
¶
BoardMembership(schema: Schema, session: Planka)
Bases: PlankaModel[BoardMembership]
Python interface for Planka BoardMemberships
| METHOD | DESCRIPTION |
|---|---|
copy |
Create a deepcopy of the model and its associated schema. |
delete |
Delete the BoardMebership |
diff |
Get a schema diff between two model schemas. |
sync |
Sync the BoardMembership with the Planka server |
update |
Update the BoardMembership |
| ATTRIBUTE | DESCRIPTION |
|---|---|
__formatter__ |
Formatter func that allows overriding str behavior for models
TYPE:
|
board |
The Board the BoardMembership is associated with
TYPE:
|
can_comment |
Whether the user can comment on cards
TYPE:
|
created_at |
When the board membership was created
TYPE:
|
project |
The Project the BoardMembership belongs to
TYPE:
|
role |
Role of the user in the board
TYPE:
|
updated_at |
When the board membership was last updated
TYPE:
|
user |
The User the BoardMembership is associated with (Raises LookupError if User no longer in the Board)
TYPE:
|
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
user
property
¶
user: User
The User the BoardMembership is associated with (Raises LookupError if User no longer in the Board)
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 | |
delete
¶
delete()
Delete the BoardMebership
Source code in src/plankapy/v2/models/board_membership.py
86 87 88 | |
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 | |
sync
¶
sync()
Sync the BoardMembership with the Planka server
Source code in src/plankapy/v2/models/board_membership.py
76 77 78 79 80 | |
update
¶
update(**kwargs: Unpack[Request_updateBoardMembership]) -> None
Update the BoardMembership
Source code in src/plankapy/v2/models/board_membership.py
82 83 84 | |