【问题标题】:Asana Python Connector - Get dataframe of all tasks for all projectsAsana Python Connector - 获取所有项目的所有任务的数据框
【发布时间】:2020-06-23 10:21:47
【问题描述】:

我正在尝试获取 python 中某个工作区中所有项目的所有任务的信息,以便生成一些图表。我正在努力获取有关如何在线或在https://github.com/Asana/python-asana 上实现这一目标的任何信息。这是我得到的。

import asana

personal_access_token = 'xxxxxxxxxxxx'

client = asana.Client.access_token(personal_access_token)

非常感谢您对此的帮助。

【问题讨论】:

    标签: python-3.x asana asana-api asana-connect


    【解决方案1】:

    在 Python 3 中使用此代码:

    import asana
    from oauth2client.service_account import ServiceAccountCredentials
    
    client = asana.Client.basic_auth('0/xxxxxxxxxxxxxxxxxxxxx')
    me = client.users.me()
    

    关于您的工作区详细信息:

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

    在工作区中查找所有项目名称:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-21
      • 1970-01-01
      • 2016-10-04
      • 1970-01-01
      • 1970-01-01
      • 2015-07-24
      • 2023-04-09
      • 2023-03-30
      相关资源
      最近更新 更多