Asana Python Connector - Get dataframe of all tasks for all projects

472 Views Asked by At

I am trying to get the information of all the tasks for all the projects in a certain workspace in python so i get generate some graphs. I am struggling to get any information on how to achieve this online or on https://github.com/Asana/python-asana. This is as far as i got.

import asana

personal_access_token = 'xxxxxxxxxxxx'

client = asana.Client.access_token(personal_access_token)

I would really appreciate some help on this.

1

There are 1 best solutions below

0
Sai Pratheek On

Use this Code in Python 3:

import asana
from oauth2client.service_account import ServiceAccountCredentials

client = asana.Client.basic_auth('0/xxxxxxxxxxxxxxxxxxxxx')
me = client.users.me()

For Your Workspace Details:

workspace_id = me['workspaces'][0]['gid']

To find all projects name in workspace:

 proj= client.projects.find_all({'workspace': a_workspace_id,"opt_fields":{"this.name"}})