擅长:python、mysql、java
<p>要在GAE服务器上运行这个程序,我发现需要三个步骤:</p>
<ol>
<li><p>安装最新版本的<a href="https://code.google.com/p/google-api-python-client/">Google API Client</a>(或者至少安装oauth2client模块)。请注意,它们提供了一个以GAE为目标的下载。</p></li>
<li><p>将.p12密钥文件转换为.pem格式(使用openssl命令行工具)</p>
<pre><code>openssl pkcs12 -nocerts -in cert.p12 -out cert.pem
</code></pre></li>
<li><p>将PyCrypto库添加到app.yaml。</p>
<pre><code>libraries:
- name: pycrypto
version: "2.6" # this could be "latest" if you are daring
</code></pre></li>
</ol>
<p>对于dev_appserver,还需要在本地安装PyCrypto库,因为它不包含在SDK中。(API客户端库也支持OpenSSL,但我假设使用PyCrypto更接近运行时环境。)</p>