0

퓨전 테이블 API에 액세스하기 위해 공용 google-api-python-client을 사용하고있어 유용 할 수 없습니다.service = build ("fusiontables", "v1", http = http)가 작동하지 않습니다.

글쎄, 나는 기능에 대한 도움말을 읽었습니다 :

service = build("fusiontables", "v1") 
help(service) 

이있어 :

class Resource(__builtin__.object) 
| A class for interacting with a resource. 
| 
| Methods defined here: 
| 
| __init__(self) 
| 
| column = methodResource(self) 
|  A collection resource. 
| 
| query = methodResource(self) 
|  A collection resource. 
| 
| style = methodResource(self) 
|  A collection resource. 
| 
| table = methodResource(self) 
|  A collection resource. 
| 
| template = methodResource(self) 
|  A collection resource. 

하고 여전히 나에게 아무것도주지 않았다. "{ ': #의 tableList을 u'fusiontables'u'kind}는"

나는 그것은 내게 준 sample

f = file('key.p12', 'rb') 
key = f.read() 
f.close() 

credentials = SignedJwtAssertionCredentials(
    '...', 
    key, 
    scope='https://www.googleapis.com/auth/fusiontables') 
http = httplib2.Http() 
http = credentials.authorize(http) 

service = build("fusiontables", "v1", http=http) 
print(service.table().list().execute()) 

에서 코드를 시도했습니다.

하지만 여전히 SQL 쿼리를 실행하는 방법을 알지 못했습니다. 테이블에 행을 삽입하는 방법은 무엇입니까? 그 순간을 설명해 주시겠습니까?

답변

1

구체적으로 퓨전 테이블 클라이언트 파이썬 코드는 http://code.google.com/p/fusion-tables-client-python/입니다.이 코드를 성공적으로 사용했습니다.

+0

감사합니다. 나는이 라이브러리를 나중에 google-api-python-client에서 찾았으므로 google-api 작업을하기로 결정했다.) 결국 융합 테이블 클라이언트를 사용하는 것처럼 보인다. – Dimitry

+0

해당 라이브러리를 사용해 보았습니다. 서비스 계정의 지원이 부족하기 때문에별로 좋지 않습니다. ( – Dimitry