Python查询中的SOQL

Python查询中的SOQL,python,salesforce,soql,beatbox,simple-salesforce,Python,Salesforce,Soql,Beatbox,Simple Salesforce,我想知道是否有人知道如何使用beatbox或simple salesforce格式化IN查询。例如: select id from lead where id in ('00Q3000000zLxkFEAS', '00Q3000000eODvUEAW') 在simple salesforce中,我有: sf.get_sfcontacts_all(param="where Id in ({0})".format()) 我曾尝试使用arg格式的列表、元组和字符串,但不断收到格式错误的请求 有什么

我想知道是否有人知道如何使用beatbox或simple salesforce格式化IN查询。例如:

select id from lead where id in ('00Q3000000zLxkFEAS', '00Q3000000eODvUEAW')
在simple salesforce中,我有:

sf.get_sfcontacts_all(param="where Id in ({0})".format())
我曾尝试使用arg格式的列表、元组和字符串,但不断收到格式错误的请求


有什么帮助吗?

使用Beatbox和python 2.7,您不应该得到格式错误的查询。查找以下使用的代码,无任何错误:

import beatbox

"salesforceusername and password"
username = 'xxx'
password = "xxx"
token    = 'xxx'

"""conenct and authenticate"""
svc = beatbox.PythonClient()
svc.login(username, password+token)

"""execut SOQL query"""
res = svc.query("select id from lead where id in ('00Q3000000zLxkFEAS', '00Q3000000eODvUEAW')")

"""prints results in console"""
print(res)