ckan-downloader
An interactive command-line utility for downloading data from a CKAN data portal.
Provide a CSV with or specify some dataset IDs to start downloading all resources attached to those datasets into folders.
Installation
pip install ckan-downloader
Example usage
$ python -m ckan_downloader
CKAN Downloader 0.1.0
What is the data portal URL?
> geoscience.data.qld.gov.au
Test connection to https://geoscience.data.qld.gov.au/api/action/site_read was successful.
Do you have a CSV with the dataset IDs to download? (y/n)
> y
What is the CSV file path?
> tests/test1.csv
Does this CSV have a header row? (y/n)
> y
The name of the field/column containing the dataset IDs is needed. The options are:
id, PID, Report Title
Which field has the IDs?
> PID
Which directory should the downloads be saved in?
> downloads
Starting dataset cr109373
Downloading CR109373 Report Geometry (https://geoscience.data.qld.gov.au/dataset/e2f7ae5f-e62a-403d-ba55-539074a5380c/resource/geo-doc363732-cr109373/download/%252FReport%25252f109373%25252fDocument%25252f363732%25252f109373.zip) to downloads/cr109373/109373.zip
Downloading WHOLE REPORT (https://gsq-horizon.s3-ap-southeast-2.amazonaws.com/QDEX/109373/cr_109373_1.pdf) to downloads/cr109373/cr_109373_1.pdf
Starting dataset cr108134
Downloading CR108134 Report Geometry (https://geoscience.data.qld.gov.au/dataset/61d06582-c2cf-48ce-a5de-162e71f38ab3/resource/geo-doc361522-cr108134/download/%252FReport%25252f108134%25252fDocument%25252f361522%25252f108134.zip) to downloads/cr108134/108134.zip
Downloading WHOLE REPORT (https://gsq-horizon.s3-ap-southeast-2.amazonaws.com/QDEX/108134/cr_108134_1.pdf) to downloads/cr108134/cr_108134_1.pdf
Future improvements
- add command line options to skip interactive mode
- search by spatial extent
- include or skip certain filetypes
- use progress bars
Metadata
Release files for ckan-downloader 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ckan-downloader-0.1.1.tar.gz | 4.2 kB | Without provenance | Details for ckan-downloader-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ckan_downloader-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ckan_downloader-0.1.1-py3-none-any.whl |
Total release size: 8.7 kB
Release files / ckan-downloader-0.1.1.tar.gz
| Download URL | ckan-downloader-0.1.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff8083bde8f91b56205855fbbd56a4452e0de782d81d3b79f5cf815f246a75fe
|
|
BLAKE2b-256 checksum How to use checksums |
f324afa95a16a3c4d7684632e68c38dfd29a93e99471d3a182aa71604bcbeb1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.3 CPython/3.6.8 Darwin/19.6.0
|
Release files / ckan_downloader-0.1.1-py3-none-any.whl
| Download URL | ckan_downloader-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe410d9fcda92f15af8a79dc6c5a0e867f787ebfa6b8ba8a46711b06ab84b486
|
|
BLAKE2b-256 checksum How to use checksums |
83d1b4f7b1d7d797051e2580dbcf614bd226965ded4587ca67424fdd93ba644b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.3 CPython/3.6.8 Darwin/19.6.0
|
Security for ckan-downloader 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.