{ "info": { "author": "Reuben Cummings", "author_email": "reubano@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7" ], "description": "# 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 >= 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).", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/reubano/ckanutils", "keywords": "c,k,a,n,u,t,i,l,s", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ckanutils", "package_url": "https://pypi.org/project/ckanutils/", "platform": "MacOS X,Windows,Linux", "project_url": "https://pypi.org/project/ckanutils/", "project_urls": { "Homepage": "https://github.com/reubano/ckanutils" }, "release_url": "https://pypi.org/project/ckanutils/0.14.9/", "requires_dist": [ "ckanapi (==3.5)", "chardet (==2.3.0)", "manage.py (==0.2.10)", "python-slugify (==0.0.7)", "python-dateutil (==2.4.2)", "requests (==2.8.1)", "unicodecsv (==0.9.4)", "xlrd (==0.9.3)", "xattr (==0.7.5)", "tabutils (==0.23.1)" ], "requires_python": null, "summary": "Miscellaneous CKAN utility library", "version": "0.14.9" }, "last_serial": 1845193, "releases": { "0.11.1": [ { "comment_text": "", "digests": { "md5": "51a3a7acc5e4dd28170b8d665c0ddb36", "sha256": "cc722522b821ecfed7c213f0aa54515d15039f480c75f690a66ea09d89891db0" }, "downloads": -1, "filename": "ckanutils-0.11.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "51a3a7acc5e4dd28170b8d665c0ddb36", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11250, "upload_time": "2015-08-25T17:41:41", "url": "https://files.pythonhosted.org/packages/29/e1/b76fb7e9fd258be1f0034704404d625b1c2e9818db19c8b971ffeed6bb75/ckanutils-0.11.1-py2.py3-none-any.whl" } ], "0.11.2": [ { "comment_text": "", "digests": { "md5": "d6d13d95d8b1e3df78acc78990c0ef48", "sha256": "6287e6704a2f1612e1c11e3a66a9034daeaa8826bc2e11887c7fe68a2135f16a" }, "downloads": -1, "filename": "ckanutils-0.11.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d6d13d95d8b1e3df78acc78990c0ef48", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11225, "upload_time": "2015-08-25T17:56:40", "url": "https://files.pythonhosted.org/packages/ff/e6/8c0c553d10564236ff007409ccb847befaa64005d77427e280065e445335/ckanutils-0.11.2-py2.py3-none-any.whl" } ], "0.11.3": [ { "comment_text": "", "digests": { "md5": "9e01e770003c73005dae0a875be5d8f1", "sha256": "9d613558c574d483a8a7e927516ab3dc75fba3bd1971d450da9a3c1a007e5a28" }, "downloads": -1, "filename": "ckanutils-0.11.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "9e01e770003c73005dae0a875be5d8f1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11220, "upload_time": "2015-08-25T19:57:36", "url": "https://files.pythonhosted.org/packages/17/9a/a0e8285f8dcf955a6a5efbdb024b2c2ec37bd5b38bf8f38eee131a17076c/ckanutils-0.11.3-py2.py3-none-any.whl" } ], "0.11.4": [ { "comment_text": "", "digests": { "md5": "98d1b1cb13354fd320523d0888fb434d", "sha256": "91b322f3b61a48cb6d8a9fa19059336b2ab7206b49bfdc5eb1afd508d68d481e" }, "downloads": -1, "filename": "ckanutils-0.11.4-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "98d1b1cb13354fd320523d0888fb434d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11232, "upload_time": "2015-08-25T22:20:34", "url": "https://files.pythonhosted.org/packages/b6/c0/149d86161739830c8aceeef0304764cc5716dfdebe6fa489f34300025a9a/ckanutils-0.11.4-py2.py3-none-any.whl" } ], "0.11.5": [ { "comment_text": "", "digests": { "md5": "6cd61da6e97733092a9e0c1f87fcbd49", "sha256": "b27481771e3a50823c5618e97ed37357020790e8860deda88050e6984e45c717" }, "downloads": -1, "filename": "ckanutils-0.11.5-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "6cd61da6e97733092a9e0c1f87fcbd49", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11231, "upload_time": "2015-08-26T14:01:19", "url": "https://files.pythonhosted.org/packages/07/ea/4a53258e2ff32c0d61b22a4170f35810919140db09ab621818a3de678e8b/ckanutils-0.11.5-py2.py3-none-any.whl" } ], "0.12.1": [ { "comment_text": "", "digests": { "md5": "4703c6e59ca3ef67bc4cd7b48359a029", "sha256": "5afbd333aa0231dd80e23bff43494fc7d83e252ebc3c138f6296e67d100bb1fa" }, "downloads": -1, "filename": "ckanutils-0.12.1-py27-none-any.whl", "has_sig": true, "md5_digest": "4703c6e59ca3ef67bc4cd7b48359a029", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11259, "upload_time": "2015-09-25T07:53:57", "url": "https://files.pythonhosted.org/packages/57/38/b3201edb98282af93002ad3e4c37deaf9f7e4c3a8e8d528e129da851a929/ckanutils-0.12.1-py27-none-any.whl" } ], "0.13.0": [ { "comment_text": "", "digests": { "md5": "58359ef6d1db2a8b7cddaa52e86e5d92", "sha256": "29f6f4155addca0cf60a964f00be79c4d62bf89532b0b91154a1de1c10bc9c4c" }, "downloads": -1, "filename": "ckanutils-0.13.0-py27-none-any.whl", "has_sig": true, "md5_digest": "58359ef6d1db2a8b7cddaa52e86e5d92", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11350, "upload_time": "2015-10-29T16:48:06", "url": "https://files.pythonhosted.org/packages/21/54/0ba70abbc703420fe534198ec7e0e5433245d39490ac372320cfe5c60722/ckanutils-0.13.0-py27-none-any.whl" } ], "0.14.1": [ { "comment_text": "", "digests": { "md5": "68d87788e651bbdf3843754f5974384f", "sha256": "214bf6e62eeafea6b8d43e6116edcfd986d23d7c3c48104eaa8fa6fc6c1def2e" }, "downloads": -1, "filename": "ckanutils-0.14.1-py27-none-any.whl", "has_sig": true, "md5_digest": "68d87788e651bbdf3843754f5974384f", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11476, "upload_time": "2015-11-12T13:43:01", "url": "https://files.pythonhosted.org/packages/70/b3/a31d10df466ec8cf59a93826987c03500195f423b148d150c250f606690f/ckanutils-0.14.1-py27-none-any.whl" } ], "0.14.2": [ { "comment_text": "", "digests": { "md5": "90d27cc6e8b729898da5ae4d96d16e48", "sha256": "8ab504112fb3afa3785f3798e54a08ca3abf7cd1f1bc92fe07a3e7d9f695dd67" }, "downloads": -1, "filename": "ckanutils-0.14.2-py27-none-any.whl", "has_sig": true, "md5_digest": "90d27cc6e8b729898da5ae4d96d16e48", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11567, "upload_time": "2015-11-21T16:30:44", "url": "https://files.pythonhosted.org/packages/4b/70/02cba25747692ab6a6c874dd3d17ac80174950d4c6a34f01fde3fd823e95/ckanutils-0.14.2-py27-none-any.whl" } ], "0.14.3": [ { "comment_text": "", "digests": { "md5": "a96ebb911c8f2f91ad792fc3d605e0b7", "sha256": "e8beb230b031ae5c8d7d0d4d7736d6179e137c7aba2b1a322f5c6572995d74dc" }, "downloads": -1, "filename": "ckanutils-0.14.3-py27-none-any.whl", "has_sig": true, "md5_digest": "a96ebb911c8f2f91ad792fc3d605e0b7", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11569, "upload_time": "2015-11-25T14:16:00", "url": "https://files.pythonhosted.org/packages/38/08/fa9a9576aed49fcca8892455c83935c964b4277f45a30b4c99b56ee45c7a/ckanutils-0.14.3-py27-none-any.whl" } ], "0.14.4": [ { "comment_text": "", "digests": { "md5": "6c85fc7796b2429afae51469fd9e568b", "sha256": "74f824f4b443752983187b522945a97af07126f3f76b15135e6e96d394197722" }, "downloads": -1, "filename": "ckanutils-0.14.4-py27-none-any.whl", "has_sig": true, "md5_digest": "6c85fc7796b2429afae51469fd9e568b", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11592, "upload_time": "2015-11-25T14:24:18", "url": "https://files.pythonhosted.org/packages/33/24/8429bfeb99e1b3c1042b3f49843ad90bccf83e96886ffde96c0dd8c4832d/ckanutils-0.14.4-py27-none-any.whl" } ], "0.14.5": [ { "comment_text": "", "digests": { "md5": "7973ba5a28e0c844c12dbf82bb0007c2", "sha256": "97c6f1e61c90cd281037cae853197e6dcbc3e21071bd61afd1ce24b9f2abced1" }, "downloads": -1, "filename": "ckanutils-0.14.5-py27-none-any.whl", "has_sig": true, "md5_digest": "7973ba5a28e0c844c12dbf82bb0007c2", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11666, "upload_time": "2015-11-25T15:03:00", "url": "https://files.pythonhosted.org/packages/4e/5b/1e107b8e84c5c7b7e44d38b8b9139a12ece3fe39a0bc9b47f6d0ba8edfb8/ckanutils-0.14.5-py27-none-any.whl" } ], "0.14.6": [ { "comment_text": "", "digests": { "md5": "7f536395a514f5f5e0b37e11862b304a", "sha256": "f9f250ac392b127a380eccfa04389581240fbbcebc4ea03442f365f923aa9e70" }, "downloads": -1, "filename": "ckanutils-0.14.6-py27-none-any.whl", "has_sig": true, "md5_digest": "7f536395a514f5f5e0b37e11862b304a", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11530, "upload_time": "2015-11-26T10:18:22", "url": "https://files.pythonhosted.org/packages/ba/50/a7c01ae47b28962fe3f81fe4fe210f58a8f78f76c6e13ef5f48af59f8389/ckanutils-0.14.6-py27-none-any.whl" } ], "0.14.7": [ { "comment_text": "", "digests": { "md5": "4e319fe2b5f3ca9d12b0160baff1ef19", "sha256": "cd1133252894b3401edda7bd17512d0a0943affe7a29b8756e291afd617972b0" }, "downloads": -1, "filename": "ckanutils-0.14.7-py27-none-any.whl", "has_sig": true, "md5_digest": "4e319fe2b5f3ca9d12b0160baff1ef19", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11822, "upload_time": "2015-12-03T15:07:58", "url": "https://files.pythonhosted.org/packages/24/fb/38e76b9e0979c989e757c9668cb4b13055965b3e0dbedb0dbb2f83579c65/ckanutils-0.14.7-py27-none-any.whl" } ], "0.14.8": [ { "comment_text": "", "digests": { "md5": "3c33b8c0151de802d141e72656c0db02", "sha256": "7518b3c57ec737e7c49166578ceccaf3e56228f288977a166fb71d4476d8f117" }, "downloads": -1, "filename": "ckanutils-0.14.8-py27-none-any.whl", "has_sig": true, "md5_digest": "3c33b8c0151de802d141e72656c0db02", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11826, "upload_time": "2015-12-03T15:20:08", "url": "https://files.pythonhosted.org/packages/be/13/1a6615ecb699925b28f55a0ab1d1e1243e7a996034f2dcc94f91fe69ed8a/ckanutils-0.14.8-py27-none-any.whl" } ], "0.14.9": [ { "comment_text": "", "digests": { "md5": "d4d2dc9850afed50bb73ff8327ffea7c", "sha256": "a008e7111d3b2aa0a435ea8132bc88f2afee62f62f3a1c41e021e3da92dee5f4" }, "downloads": -1, "filename": "ckanutils-0.14.9-py27-none-any.whl", "has_sig": true, "md5_digest": "d4d2dc9850afed50bb73ff8327ffea7c", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11828, "upload_time": "2015-12-03T15:30:01", "url": "https://files.pythonhosted.org/packages/9b/ff/0f9cd9222303d74ddc1e1d71a3f26098409f256f64509eb90f2736f6a00b/ckanutils-0.14.9-py27-none-any.whl" } ], "0.9.1": [] }, "urls": [ { "comment_text": "", "digests": { "md5": "d4d2dc9850afed50bb73ff8327ffea7c", "sha256": "a008e7111d3b2aa0a435ea8132bc88f2afee62f62f3a1c41e021e3da92dee5f4" }, "downloads": -1, "filename": "ckanutils-0.14.9-py27-none-any.whl", "has_sig": true, "md5_digest": "d4d2dc9850afed50bb73ff8327ffea7c", "packagetype": "bdist_wheel", "python_version": "py27", "requires_python": null, "size": 11828, "upload_time": "2015-12-03T15:30:01", "url": "https://files.pythonhosted.org/packages/9b/ff/0f9cd9222303d74ddc1e1d71a3f26098409f256f64509eb90f2736f6a00b/ckanutils-0.14.9-py27-none-any.whl" } ] }