Всем доброго времени суток. второй день пытаюсь установить Google Api под язык python и одинаково безуспешно по windows и linux осями. Кто с этим сталкивался, помогите. Просьба не отсылать в хелп гугла, т.к. там все врут
#!/usr/bin/python
# -*- coding: utf-8 -*-
import hashlib
from oauth2client import gce
import pickle
from google.appengine.api import memcache
...
Traceback (most recent call last):
File "a2gc.py", line 9, in <module>
from google.appengine.api import memcache
ImportError: No module named google.appengine.api
Снова всем привет. Таки я достучался до всей этой хрени и даже авторизовался, но, блин, у меня проблемы связанные с расхождением в документации.
from apiclient.discovery import build
service = build('api_name', 'api_version', ...)
collection = service.stamps()
or
nested_collection = service.featured().stamps()
gc = build('calendar', 'v3', http=http_auth)
collection = gc.stamps()
$ python
>>> help()
help> apiclient.discovery.Resource
apiclient.discovery.Resource = class Resource(__builtin__.object)
| A class for interacting with a resource.
|
| Methods defined here:
|
| __getstate__(self)
| Trim the state down to something that can be pickled.
|
| Uses the fact that the instance variable _dynamic_attrs holds attrs that
| will be wiped and restored on pickle serialization.
|
| __init__(self, http, baseUrl, model, requestBuilder, developerKey, resourceDesc, rootDesc, schema)
| Build a Resource from the API description.
|
| Args:
| http: httplib2.Http, Object to make http requests with.
| baseUrl: string, base URL for the API. All requests are relative to this
| URI.
| model: apiclient.Model, converts to and from the wire format.
| requestBuilder: class or callable that instantiates an
| apiclient.HttpRequest object.
| developerKey: string, key obtained from
| https://code.google.com/apis/console
| resourceDesc: object, section of deserialized discovery document that
| describes a resource. Note that the top level discovery document
| is considered a resource.
| rootDesc: object, the entire deserialized discovery document.
| schema: object, mapping of schema names to schema descriptions.
|
| __setstate__(self, state)
| Reconstitute the state of the object from being pickled.
|
| Uses the fact that the instance variable _dynamic_attrs holds attrs that
| will be wiped and restored on pickle serialization.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
Всем спасибо. Тему можно закрывать.
Форум Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)