Using_the_API - ckan/ckan GitHub Wiki

import ckanclient

Instantiate the CKAN client.

ckan = ckanclient.CkanClient(api_key=my_api_key, base_location="http://myckaninstance.com/api")

Describe the package.

package_entity = { 'name': my_package_name, 'url': my_package_url, 'download_url': my_package_download_url, 'tags': my_package_keywords, 'notes': my_package_long_description, }

Register the package.

ckan.package_register_post(package_entity)