我正在尝试用ckanclient上传一个json文件到我在Datahub.io中的账户,我得到了这个错误:
ckanclient.CkanApiError: Got redirected to another URL, which does not work with POSTS. Redirection: http://thedatahub.org/api/storage/auth/form/2013-07-26T022918/my.json -> http://datahub.io/user/login?came_from=http://datahub.io/api/storage/
我想添加额外的标题网站导航标签到默认的。 我尝试过使用here提供的解决方案,但它对我不起作用。我收到Exception: menu item接口cannot be found错误 这是我的plugin.py代码 import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
class ApiPlugin(plugins.SingletonPlugin, toolkit.DefaultDatasetForm):
plugins.implements(plugins.IRoutes, inherit=Tru
我正在尝试在我的CKAN实例中自动上传数据集和资源。我使用的是Ubuntu Linux 10.04 64位,我的CKAN实例版本是1.8。
我可以使用如下命令创建一个新的数据集:
$ curl http://ckan.installation.com/api/rest/dataset -H "Authorization:<my api key>" -d '{"name": "dataset-name", "title": "The Name of the Dataset"}'
{...
我用Python编写了一个程序,它使用两个不同的API从两个不同的服务(CKAN和MediaWiki)获取数据。特别是有一个类Resource,它从上面提到的服务中请求数据并处理它。
在某种程度上,我得出结论,需要对我的应用程序进行测试。问题是,我在网上和书本上找到的所有例子都没有处理过这样的案例。
例如,在Resource类中,我有一个方法:
def load_from_ckan(self):
"""
Get the resource
specified by self.id
from config.ckan_a