如何在Py-trello的“列出完成”列表中打印所有卡片?

时间:2018-07-16 09:32:23

标签: python trello

我编写了返回所有trello卡数组的函数:

def get_cards_from_board(my_board_1):
    T = []
    lists = my_board_1.list_lists()
    for l in lists:
        cards = l.list_cards()
        for c in cards:
            assert isinstance(c, object)
            T.append(c)
    return T

但是我想退回/打印已完成的所有trello卡,换句话说,从一个列表中的所有trello卡-。我该怎么办?

1 个答案:

答案 0 :(得分:0)

我自己找到答案:

def get_cards_from_board(my_board_1):
T = []
lists = my_board_1.list_lists()
for l in lists:
    if l.name == 'Done':
        cards = l.list_cards()
        for c in cards:
            assert isinstance(c, object)
            T.append(c)
return T