{"id":17046468,"url":"https://github.com/reubano/ckanny","last_synced_at":"2026-04-28T21:05:52.675Z","repository":{"id":62562427,"uuid":"41380038","full_name":"reubano/ckanny","owner":"reubano","description":"A Python command line interface (CLI) for interacting with CKAN instances","archived":false,"fork":false,"pushed_at":"2022-12-26T19:43:52.000Z","size":242,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-15T06:32:17.274Z","etag":null,"topics":["ckan","cli","data","featured","open-data"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reubano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-25T18:14:54.000Z","updated_at":"2017-06-22T16:29:53.000Z","dependencies_parsed_at":"2023-01-31T00:50:15.021Z","dependency_job_id":null,"html_url":"https://github.com/reubano/ckanny","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/reubano/ckanny","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reubano","download_url":"https://codeload.github.com/reubano/ckanny/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanny/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32399093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ckan","cli","data","featured","open-data"],"created_at":"2024-10-14T09:46:21.322Z","updated_at":"2026-04-28T21:05:52.660Z","avatar_url":"https://github.com/reubano.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ckanny\n\n## Introduction\n\nckanny is a [command line interface](#cli) for interacting with remote and local [CKAN](http://ckan.org/) instances. Under the hood, it uses [ckanutils](https://github.com/reubano/ckanutils).\n\nWith ckanny, you can\n\n- Download a CKAN resource\n- Create a CKAN package\n- Update a CKAN DataStore from data in the FileStore\n- Copy a FileStore resource from one CKAN instance to another\n- and much more...\n\nckanny performs smart updates by computing the hash of a file and will only update the datastore if the file has changed. This allows you to schedule a script to run on a frequent basis, e.g., `@hourly` via a cron job, without updating the CKAN instance unnecessarily.\n\n## Requirements\n\nckanny has been tested on the following configuration:\n\n- MacOS X 10.9.5\n- Python 2.7.9\n\nckanny requires the following in order to run properly:\n\n- [Python \u003e= 2.7](http://www.python.org/download) (MacOS X comes with python preinstalled)\n\n## Installation\n\n(You are using a [virtualenv](http://www.virtualenv.org/en/latest/index.html), right?)\n\n     sudo pip install ckanny\n\n## CLI\n\nckanny comes with a built in command line interface `ckanny`.\n\n### Usage\n\n     ckanny [\u003cnamespace\u003e.]\u003ccommand\u003e [\u003cargs\u003e]\n\n### Examples\n\n*show help*\n\n    ckanny -h\n\n```bash\nusage: ckanny [\u003cnamespace\u003e.]\u003ccommand\u003e [\u003cargs\u003e]\n\npositional arguments:\n  command     the command to run\n\noptional arguments:\n  -h, --help  show this help message and exit\n\navailable commands:\n  ver                      Show ckanny version\n\n  [ds]\n    delete                 Deletes a datastore table\n    update                 Updates a datastore table based on the current filestore resource\n    upload                 Uploads a file to a datastore table\n\n  [fs]\n    fetch                  Downloads a filestore resource\n    migrate                Copies a filestore resource from one ckan instance to another\n    upload                 Updates the filestore of an existing resource or creates a new one\n\n  [hdx]\n    customize              Introspects custom organization values\n\n  [pk]\n    create                 Creates a package (aka dataset)\n```\n\n*show version*\n\n    ckanny ver\n\n*fetch a resource*\n\n    ckanny fs.fetch -k \u003cCKAN_API_KEY\u003e -r \u003cCKAN_URL\u003e \u003cresource_id\u003e\n\n*show fs.fetch help*\n\n    ckanny fs.fetch -h\n\n```bash\nusage: ckanny fs.fetch\n       [-h] [-q] [-n] [-c CHUNKSIZE_BYTES] [-u UA] [-k API_KEY] [-r REMOTE]\n       [-d DESTINATION]\n       [resource_id]\n\nDownloads a filestore resource\n\npositional arguments:\n  resource_id           the resource id\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -q, --quiet           suppress debug statements\n  -n, --name-from-id    Use resource id for filename\n  -c CHUNKSIZE_BYTES, --chunksize-bytes CHUNKSIZE_BYTES\n                        number of bytes to read/write at a time (default:\n                        1048576)\n  -u UA, --ua UA        the user agent (uses `CKAN_USER_AGENT` ENV if\n                        available) (default: None)\n  -k API_KEY, --api-key API_KEY\n                        the api key (uses `CKAN_API_KEY` ENV if available)\n                        (default: None)\n  -r REMOTE, --remote REMOTE\n                        the remote ckan url (uses `CKAN_REMOTE_URL` ENV if\n                        available) (default: None)\n  -d DESTINATION, --destination DESTINATION\n                        the destination folder or file path (default:\n                        .)\n```\n\n*create a package*\n\n    ckanny pk.create -k \u003cCKAN_API_KEY\u003e -r \u003cCKAN_URL\u003e \u003corg_id\u003e\n\n*create a package with resources*\n\n    ckanny pk.create -k \u003cCKAN_API_KEY\u003e -r \u003cCKAN_URL\u003e -f 'file1.csv,file2.csv' \u003corg_id\u003e\n\n*show pk.create help*\n\n    ckanny pk.create -h\n\n```bash\nusage: /Users/reubano/.virtualenvs/ckan/bin/ckanny pk.create\n       [-h] [-q] [-u UA] [-k API_KEY]\n       [-r REMOTE] [-e END] [-S START]\n       [-L LOCATION] [-c CAVEATS] [-y TYPE]\n       [-T TAGS] [-t TITLE]\n       [-m {observed,other,census,survey,registry}]\n       [-d DESCRIPTION] [-f FILES] [-s SOURCE]\n       [-l LICENSE_ID]\n       [org_id]\n\nCreates a package (aka dataset)\n\npositional arguments:\n  org_id                the organization id\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -q, --quiet           suppress debug statements\n  -u UA, --ua UA\n                        the user agent (uses `CKAN_USER_AGENT` ENV if\n                        available) (default: None)\n  -k API_KEY, --api-key API_KEY\n                        the api key (uses `CKAN_API_KEY` ENV if available)\n                        (default: None)\n  -r REMOTE, --remote REMOTE\n                        the remote ckan url (uses `CKAN_REMOTE_URL` ENV if\n                        available) (default: None)\n  -e END, --end END\n                        Data end date\n  -S START, --start START\n                        Data start date (default: 09/25/2015)\n  -L LOCATION, --location LOCATION\n                        Location the data represents (default: world)\n  -c CAVEATS, --caveats CAVEATS\n                        Package caveats\n  -y TYPE, --type TYPE\n                        Package type (default: dataset)\n  -T TAGS, --tags TAGS\n                        Comma separated list of tags\n  -t TITLE, --title TITLE\n                        Package title (default: Untitled 2015-09-25\n                        12:36:14.141533)\n  -m {observed,other,census,survey,registry}, --methodology {observed,other,census,survey,registry}\n                        Data collection methodology (default: observed)\n  -d DESCRIPTION, --description DESCRIPTION\n                        Dataset description (default: same as `title`)\n  -f FILES, --files FILES\n                        Comma separated list of file paths to add\n  -s SOURCE, --source SOURCE\n                        Data source (default: Multiple sources)\n  -l LICENSE_ID, --license-id LICENSE_ID\n                        Data license (default: cc-by-igo)\n```\n## Configuration\n\nckanny will use the following [Environment Variables](http://www.cyberciti.biz/faq/set-environment-variable-linux/) if set:\n\nEnvironment Variable|Description\n--------------------|-----------\nCKAN_API_KEY|Your CKAN API Key\nCKAN_REMOTE_URL|Your CKAN instance remote url\nCKAN_USER_AGENT|Your user agent\n\n## Hash Table\n\nIn order to support file hashing, ckanny creates a hash table resource called `hash_table.csv` with the following schema:\n\nfield|type\n------|----\ndatastore_id|text\nhash|text\n\nBy default the hash table resource will be placed in the package `hash_table`. ckanny will create this package if it doesn't exist. Optionally, you can set the hash table package in the command line with the `-H, --hash-table` option, or in a Python file as the `hash_table` keyword argument to `CKAN`.\n\nExample:\n\n    ckanny ds.update -H custom_hash_table 36f33846-cb43-438e-95fd-f518104a32ed\n\n## Scripts\n\nckanny comes with a built in task manager `manage.py` and a `Makefile`.\n\n### Setup\n\n    pip install -r dev-requirements.txt\n\n### Examples\n\n*Run python linter and nose tests*\n\n```bash\nmanage lint\nmanage test\n```\n\nOr if `make` is more your speed...\n\n```bash\nmake lint\nmake test\n```\n\n## Contributing\n\nView [CONTRIBUTING.rst](https://github.com/reubano/ckanny/blob/master/CONTRIBUTING.rst)\n\n## License\n\nckanny is distributed under the [MIT License](http://opensource.org/licenses/MIT), the same as [ckanutils](https://github.com/reubano/ckanutils).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubano%2Fckanny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubano%2Fckanny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubano%2Fckanny/lists"}