【问题标题】:Py-trello tutorial or examplePy-trello 教程或示例
【发布时间】:2020-05-20 12:27:20
【问题描述】:

我正在尝试将数据从我们的 trello 板提取到 python 中,并可能以表格格式输出结果,其中包含成员名称、卡名、描述、打开日期、到期日等。

我找到的最接近的东西是这个包 py-trello,但除了获取板和卡的名称之外,我无法继续进行。有谁有这个包的经验可以指导我吗?

pip install py-trello
from trello import TrelloClient
client = TrelloClient(
    api_key='Your API Key',
    api_secret='Your Secret',
    token='Your Token',

all_boards = client.list_boards()
last_board = all_boards[-1]
print(last_board.name)
board = client.list_boards()[0]

board.list_lists()


all_boards = client.list_boards()
last_board = all_boards[-1]
last_board.list_lists()
my_list = last_board.get_list(list_id)

for card in my_list.list_cards():
    print(card.name)

【问题讨论】:

  • 听起来您需要指南或教程,这与 Stack Overflow 无关。请参阅:How to Askhelp center。无论如何,这太宽泛/模糊了。

标签: python trello


【解决方案1】:
all_boards = client.list_boards()
last_board = all_boards[-1]
print(last_board.name)
board = client.list_boards()[0]

board.list_lists()


all_boards = client.list_boards()
last_board = all_boards[-1]
last_board.list_lists()
list 
my_list = last_board.list_lists()[number]

print(my_list.list_cards())

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-20
    • 2011-07-04
    • 2012-02-01
    • 2017-01-07
    • 1970-01-01
    • 2013-08-06
    相关资源
    最近更新 更多