[ckan-dev] python ckanclient querying multiple tags
Timothy Lebo
lebot at rpi.edu
Wed May 9 16:38:13 UTC 2012
CKAN,
I'm trying to use the python ckanclient [1] to query for datasets with a certain set of multiple tags.
Based on [2], I was able to cobble together a successful URL query:
(A)
http://thedatahub.org/api/search/dataset?q=tags:helpme&tags:lod
But how to call this through the ckanclient?
The following works to get one tag:
self.ckan.package_search('tags:helpme')
but neither of these works to results similar to (A) above:
self.ckan.package_search('tags:helpme&tags:lod')
self.ckan.package_search('tags:helpme&tags:lod')
self.ckan.package_search([ 'tags:helpme', tags:lod' ] )
What is the appropriate query string to give package_search to get datasets with multiple tags?
Thanks for your consideration!
Regards,
Tim Lebo
[1] http://pypi.python.org/pypi/ckanclient
[2] http://docs.ckan.org/en/latest/api-v2.html#search-api
More information about the ckan-dev
mailing list