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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.