从 Google App Engine 应用程序下载数据
http://code.google.com/appengine/docs/python/tools /uploadingdata.html
这里解释了如何从gAE应用程序下载数据,
首先要做的是设置remote_api。 批量加载器工具使用remote_api与App Engine上运行的应用程序进行通信,remote_api是App Engine运行时环境中包含的请求处理程序,允许具有正确凭据的远程应用程序远程访问数据存储区。有两种安装remote_api的方法:使用builtins指令自动安装,或者使用url指令手动安装。
我使用内置指令启用了它: 我相应地更改了 app.yaml
builtins:
- remote_api: on
它给出了该指令找到remote_api的“include.yaml”文件并将请求处理程序映射到/_ah/remote_api。只有应用程序的管理员才能访问此 URL。
但我从来没有遇到过 include.yaml
之后,我尝试使用那里给出的命令下载数据
appcfg.py download_data --application=<app-id> --url=http://<appname>.appspot.com/[remote_api_path] --filename=<data-filename>
,我收到一条错误消息,说权限被拒绝,我很困惑。我也无法使用“create_bulkloader_config”命令,收到相同的错误,我很困惑,谢谢
http://code.google.com/appengine/docs/python/tools/uploadingdata.html
Here it is explained how to download data from a gAE app,
First thing to do is setting up remote_api.
The bulk loader tool communicates with your application running on App Engine using remote_api, a request handler included with the App Engine runtime environment that allows remote applications with the proper credentials to access the datastore remotely. There are two ways to install remote_api: automatically using the builtins directive, or you manually using the url directive.
I enabled it using builtins directive:
i changed app.yaml accordingly
builtins:
- remote_api: on
Its given that this directive finds "include.yaml" file for the remote_api and maps the request handler to /_ah/remote_api. Only administrators of the application can access this URL.
but i never came across include.yaml
after that i tried downloading data using the the commands given there
appcfg.py download_data --application=<app-id> --url=http://<appname>.appspot.com/[remote_api_path] --filename=<data-filename>
i'm getting an error saying permission denied, i'm confused. i am also not able to use "create_bulkloader_config" command, getting the same error, I'm confused, Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的应用程序是否使用开放 ID/联合登录?远程 API 不适用于开放 ID,但这里有一个解决方法:
http://blog.notdot.net/2010/06/Using-remote-api-with-OpenID-authentication
Are you using open ID / federated login for your app? The remote API does not work with open ID, but there is a workaround here:
http://blog.notdot.net/2010/06/Using-remote-api-with-OpenID-authentication
替换
为
Replace
With
您应该以管理员用户身份运行命令行。您收到的权限被拒绝错误是指 appcfg 脚本无法访问本地文件。
You Should run the commandline as an admin user. The permission denied error you are getting refers to the appcfg script not being able to access a local file.