Class Reference¶
Client¶
-
class
trello.
Client
(key=None, token=None)¶ Bases:
object
Trello client class
-
__init__
(key=None, token=None)¶ Visit https://trello.com/app-key to get API key and token
Parameters: - key (str) – Key
- token (str) – Token
Note
Uses TRELLO_API_KEY and TRELLO_API_TOKEN environment variables if key or token arguments are missing
-
close
()¶ Close HTTP connections
-
get_my_boards
()¶ Get boards
Returns: dict with board names as keys and trello.Board
instances as valuesReturn type: trello.ResourceCollection
-
Board¶
-
class
trello.
Board
(json, api)¶ Bases:
trello.resource.Resource
Board class
-
get_cards
()¶ Get cards
Returns: dict with card names as keys and trello.Card
instances as valuesReturn type: trello.ResourceCollection
-
get_custom_fields
()¶ Get custom fields
Returns: dict with field names as keys and trello.CustomField
instances as valuesReturn type: trello.ResourceCollection
-
get_labels
()¶ Get labels
Returns: dict with label names as keys and trello.Label
instances as valuesReturn type: trello.ResourceCollection
-
get_lists
()¶ Get lists
Returns: dict with list names as keys and trello.List
instances as valuesReturn type: trello.ResourceCollection
-
id
¶ Object id
Type: str
-
name
¶ Object name
Type: str
-
List¶
-
class
trello.
List
(json, api)¶ Bases:
trello.resource.Resource
List class
-
get_cards
()¶ Returns: dict with card names as keys and trello.Card
instances as valuesReturn type: trello.ResourceCollection
-
id
¶ Object id
Type: str
-
name
¶ Object name
Type: str
-
Label¶
-
class
trello.
Label
(json, api)¶ Bases:
trello.resource.Resource
Label class
-
id
¶ Object id
Type: str
-
name
¶ Object name
Type: str
-
Card¶
-
class
trello.
Card
(*args, **kwargs)¶ Bases:
trello.resource.Resource
Card class
-
due
¶ Card due datetime or None
Type: arrow.Arrow
-
last_activity
¶ Card last activity datetime or None
Type: arrow.Arrow
-
due_complete
¶ Card due complete flag
Type: bool
-
add_label
(label)¶ Adds label
Parameters: label ( trello.Label
) – Label to add
-
get_custom_field
(custom_field)¶ Returns custom_field value if its present or None. Return value type depends on custom field flavor:
- text: str
- date: arrow.Arrow
- number: int
- checkbox: bool
- list: list
Parameters: custom_field ( trello.CustomField
) – Custom field instance
-
has_label
(label)¶ Returns True if card has label
Parameters: lst ( trello.Label
) – Trello labelReturns: bool
-
id
¶ Object id
Type: str
-
is_in_list
(lst)¶ Returns True if card is in list
Parameters: lst ( trello.List
) – Trello ListReturns: bool
-
move_to_list
(target_list)¶ Moves card to the target list
Parameters: target_list ( trello.List
) – Target list
-
name
¶ Object name
Type: str
-
remove_label
(label)¶ Removes label
Parameters: label ( trello.Label
) – Label to remove
-
CustomField¶
-
class
trello.
CustomField
(json, api)¶ Bases:
trello.resource.Resource
CustomField class
-
id
¶ Object id
Type: str
-
name
¶ Object name
Type: str
-