Skip to main content

Export dataset metadata from CKAN to Excel

Project description

An API client (usable as a command-line script or as a Python library) for exporting dataset metadata from CKAN sites to Excel-compatible CSV files.

This is a thin wrapper around [losser](, hooking it up to the CKAN API.

TODO: Document the preprocessing of dataset extras.


Python 2.7, or 2.6 with the argparse library.


To install run:

pip install ckanapi-exporter

To install for development, create and activate a Python virtual environment then do:

git clone cd ckanapi-exporter python develop


From the command line:

ckanapi-exporter –url ‘’ –columns columns.json > output.csv

This will:

  1. Fetch metadata for all datasets from

  2. Transform and filter the datasets according to the columns specified in columns.json

  3. Write the result as UTF8-encoded, CSV-formatted text to output.csv

TODO: Document the columns.json file format.

Using as a Python library:

import ckanapi_exporter.exporter as exporter csv_string = exporter.export(’’, ‘columns.json’)

Returns a UTF8-encoded string.

The second argument can be either the filename of the columns.json file as a string, or a list of dictionaries (equivalent to the contents of columns.json file after loading the JSON).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanapi-exporter-0.0.1.tar.gz (3.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page