How to get members, dates, tags, list, and checklist status via Trello API using Python?

Paulo Henrique Oliveira Leite
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 28, 2024

 

Hello everyone! I'm developing a project where I need to extract various information from Trello cards using Python and the Trello API. However, I'm having trouble collecting all the data I need in an organized way. I'd like an example of a Python script or guidance to obtain the following information: Card members Start date, due date, and end date Tag names Card name Name of the list the card is allocated to Checklist items, indicating which are completed and which are not I already have my key and access token configured and can connect to the API, but I'm a little confused about how to extract all this information efficiently. If anyone has an example or can point me in the right direction, it would be a great help! Thanks in advance!

1 answer

0 votes
Jim Knepley - ReleaseTEAM
Atlassian Partner
October 28, 2024

Hi @Paulo Henrique Oliveira Leite, welcome to the community.

Briefly looking over the Trello API for your specific information, I think you're going to make calls to multiple endpoints and somehow merge the various responses (e.g. to match the member ID to something more meaningful to a human).

Depending on the size of the data, I've used two approaches:

1. Parse and store the API responses in a database like MySQL or PostgreSQL, then use SQL to join the data to produce the results you want. This requires that you run a database somewhere, but that's fairly easy these days. You only need to keep the database around as long as it takes to run the job. This is best for data sets that won't fit in RAM, and might be excessive for your needs.

2. Parse and store the API responses as Pandas dataframes, which look and behave like SQL tables to a certain extent. Critically, you can join them together similarly to how you would join tables in a SQL query. There is a learning curve with Pandas, but once you have a foothold, it's not too hard. It encourages you to write very maintainable code.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events