[ckan-dev] Datastore & filestore via API

Michele Barbera barbera at spaziodati.eu
Wed Aug 8 08:37:02 UTC 2012


Hi,
I'm using 1.7.1

here's my code:

1 ckan = ckanclient.CkanClient(
2        base_location = CKAN_HOST + '/api',
3        api_key = CKAN_API_KEY
4    )
5    r = ckan.upload_file(zip_file)
6    print 'Upload response:', r
7    r = ckan.add_package_resource(dataset_name, zip_file, name=resource +
'.zip', resource_type='metadata', format='zip')
8    print 'Add package response:', r

at 6 I get ('', 'Found') and nothing seems to happen on the server (neither
in the ckan_storage dir nor in the ckan logs).

Thanks,
michele


2012/8/8 Sean Hammond <sean.hammond at okfn.org>

> Hi, which version of CKAN are you using? I'll test file uploading with
> ckanclient here and see if it works for me
>
> ______________________________**_________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/**listinfo/ckan-dev<http://lists.okfn.org/mailman/listinfo/ckan-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120808/230f2fcf/attachment-0001.html>


More information about the ckan-dev mailing list