Skip to content

cityofcapetown/ckan-dataset-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ckan-dataset-downloader

Simple utility for downloading CKAN datasets

Installation

  • Install the requirements pip3 install -r requirements.txt

Usage

Simple use example:

python3 ckan-dataset-downloader.py --dataset-id "tidy-consumption-data" \
                                   --ckan-api-key <get from your CKAN profile>

This will download the contents of the dataset tidy-consumption-data to whichever directory you run the script.

Filtered example:

python3 ckan-dataset-downloader.py --dataset-id "tidy-consumption-data" \
                                   --ckan-api-key <get from your CKAN profile> \
                                   --resource-name-regex "shard 0" \
                                   --destination-dir "/tmp/tidy-consumption-data/"

This only selects resources from the dataset tidy-consumption-data that contains the string shard 0. It also downloads to the directory /tmp/tidy-consumption-data.

About

Simple utility for downloading CKAN datasets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages