{"id":17046467,"url":"https://github.com/reubano/ckanutils","last_synced_at":"2026-02-10T20:32:29.936Z","repository":{"id":33819075,"uuid":"37516250","full_name":"reubano/ckanutils","owner":"reubano","description":"A Python library for interacting with CKAN instances","archived":false,"fork":false,"pushed_at":"2022-12-26T19:43:52.000Z","size":238,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-05T09:28:59.978Z","etag":null,"topics":["ckan","data","library","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-06-16T07:55:16.000Z","updated_at":"2019-10-25T18:38:47.000Z","dependencies_parsed_at":"2023-01-15T02:44:57.605Z","dependency_job_id":null,"html_url":"https://github.com/reubano/ckanutils","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/reubano/ckanutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reubano","download_url":"https://codeload.github.com/reubano/ckanutils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubano%2Fckanutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29314705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","data","library","open-data"],"created_at":"2024-10-14T09:46:21.238Z","updated_at":"2026-02-10T20:32:29.919Z","avatar_url":"https://github.com/reubano.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ckanutils\n\n## Introduction\n\nckanutils is a [Python library](#library) for interacting with remote and local [CKAN](http://ckan.org/) instances. It uses [ckanapi](https://github.com/ckan/ckanapi) under the hood, and is essentially a high level wrapper for it. A command line interface built on top of this library is available at [ckanny](https://github.com/reubano/ckanny).\n\nWith ckanutils, you can\n\n- Download a CKAN resource\n- Upload CSV/XLS/XLSX files into a CKAN DataStore\n- and much more...\n\n## Requirements\n\nckanutils has been tested on the following configuration:\n\n- MacOS X 10.9.5\n- Python 2.7.9\n\nckanutils 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 ckanutils\n\n## Usage\n\nckanutils is intended to be used directly from Python.\n\n### Examples\n\n*Fetch a remote resource*\n\n```python\nfrom ckanutils import CKAN\n\nckan = CKAN(remote='http://demo.ckan.org')\nresource_id = '36f33846-cb43-438e-95fd-f518104a32ed'\nr, filepath = ckan.fetch_resource(resource_id, filepath='path/to/file.csv')\nprint(r.encoding)\n```\n\n*Fetch a local resource*\n\n```python\nfrom ckanutils import CKAN\n\nckan = CKAN(api_key='mykey', remote=None)\nresource_id = '36f33846-cb43-438e-95fd-f518104a32ed'\nr, filepath = ckan.fetch_resource(resource_id, filepath='path/to/file.csv')\nprint r.encoding\n```\n*show data*\n\n```python\nfrom ckanutils import CKAN\n\nckan = CKAN(api_key='mykey', remote=None)\nresource_id = '36f33846-cb43-438e-95fd-f518104a32ed'\nr = ckan.datastore_search(resource_id)\nprint r.next()\n```\n\n## Configuration\n\nckanutils 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, ckanutils 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`. ckanutils 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 `api.CKAN`.\n\nExample:\n\n```python\nfrom ckanutils import api\nckan = api.CKAN(hash_table='custom_hash_table')\nhash = ckan.get_hash('36f33846-cb43-438e-95fd-f518104a32ed')\n```\n\n## Scripts\n\nckanutils 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/ckanutils/blob/master/CONTRIBUTING.rst)\n\n## License\n\nckanutils is distributed under the [MIT License](http://opensource.org/licenses/MIT), the same as [ckanapi](https://github.com/ckan/ckanapi).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubano%2Fckanutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubano%2Fckanutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubano%2Fckanutils/lists"}