[](https://github.com/DataShades/ckanext-files/actions/workflows/test.yml)
# ckanext-files
Files as first-class citizens of CKAN. Upload, manage, remove files directly
and attach them to datasets, resources, etc.
Read the [documentation](https://datashades.github.io/ckanext-files/) for a full user guide.
Also, check [documentation](https://datashades.github.io/file-keeper/) of the
[file-keeper](https://pypi.org/project/file-keeper/) library. It's used by this
extension and contains logic that does not depend on CKAN and may be useful if
you are going to implement custom storage adapter or just want to use familiar
file abstractions in the arbitrary program.
## Quickstart
1. Install the extension
```sh
pip install ckanext-files
```
1. Add `files` to the `ckan.plugins` setting of the CKAN config file.
1. Run DB migrations
```sh
ckan db upgrade -p files
```
1. Configure storage
```ini
ckanext.files.storage.default.type = files:fs
ckanext.files.storage.default.path = /tmp/example
ckanext.files.storage.default.create_path = true
```
1. Upload your first file
```sh
ckanapi action files_file_create upload@~/Downloads/file.txt`
```
## Development
Install `dev` extras and nodeJS dependencies:
```sh
pip install -e '.[dev]'
npm ci
```
Run unittests:
```sh
pytest
```
Run frontend tests:
```sh
# start test server in separate terminal
make test-server
# run tests
npx cypress run
```
Run typecheck:
```sh
npx pyright
```
## License
[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
Raw data
{
"_id": null,
"home_page": null,
"name": "ckanext-files",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "DataShades <datashades@linkdigital.com.au>",
"keywords": "CKAN, file-management, cloud, filesystem",
"author": null,
"author_email": "DataShades <datashades@linkdigital.com.au>, Sergey Motornyuk <sergey.motornyuk@linkdigital.com.au>",
"download_url": "https://files.pythonhosted.org/packages/27/f6/8a6174585bec5777cd46a91bb20bcebe9ab50d423939c66171c06f968db4/ckanext_files-1.0.1.tar.gz",
"platform": null,
"description": "[](https://github.com/DataShades/ckanext-files/actions/workflows/test.yml)\n\n# ckanext-files\n\nFiles as first-class citizens of CKAN. Upload, manage, remove files directly\nand attach them to datasets, resources, etc.\n\nRead the [documentation](https://datashades.github.io/ckanext-files/) for a full user guide.\n\nAlso, check [documentation](https://datashades.github.io/file-keeper/) of the\n[file-keeper](https://pypi.org/project/file-keeper/) library. It's used by this\nextension and contains logic that does not depend on CKAN and may be useful if\nyou are going to implement custom storage adapter or just want to use familiar\nfile abstractions in the arbitrary program.\n\n\n## Quickstart\n\n1. Install the extension\n ```sh\n pip install ckanext-files\n ```\n\n1. Add `files` to the `ckan.plugins` setting of the CKAN config file.\n\n1. Run DB migrations\n ```sh\n ckan db upgrade -p files\n ```\n\n1. Configure storage\n\n ```ini\n ckanext.files.storage.default.type = files:fs\n ckanext.files.storage.default.path = /tmp/example\n ckanext.files.storage.default.create_path = true\n ```\n\n1. Upload your first file\n\n ```sh\n ckanapi action files_file_create upload@~/Downloads/file.txt`\n ```\n\n\n## Development\n\nInstall `dev` extras and nodeJS dependencies:\n\n```sh\npip install -e '.[dev]'\nnpm ci\n```\n\nRun unittests:\n```sh\npytest\n```\n\nRun frontend tests:\n```sh\n# start test server in separate terminal\nmake test-server\n\n# run tests\nnpx cypress run\n```\n\nRun typecheck:\n```sh\nnpx pyright\n```\n\n\n## License\n\n[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)\n",
"bugtrack_url": null,
"license": "AGPL",
"summary": null,
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/DataShades/ckanext-files"
},
"split_keywords": [
"ckan",
" file-management",
" cloud",
" filesystem"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "736c2537feef3ab2a7ca8fbba8d96708a88b5853bb9fd7d9e596cbf2858b1325",
"md5": "c97e5462b05460b4741ed988aecb460d",
"sha256": "2bd5e8888935a5b42dab8f0966657a28b06246268577b26c3e8034d817a074c7"
},
"downloads": -1,
"filename": "ckanext_files-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c97e5462b05460b4741ed988aecb460d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 138318,
"upload_time": "2025-07-13T18:34:32",
"upload_time_iso_8601": "2025-07-13T18:34:32.067044Z",
"url": "https://files.pythonhosted.org/packages/73/6c/2537feef3ab2a7ca8fbba8d96708a88b5853bb9fd7d9e596cbf2858b1325/ckanext_files-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "27f68a6174585bec5777cd46a91bb20bcebe9ab50d423939c66171c06f968db4",
"md5": "ab5acccadd368ad21f3f8c54f6d98332",
"sha256": "27e3a8a3e390f1c3b7c702903bb41521a67519d612b62a24310a9be5c751df24"
},
"downloads": -1,
"filename": "ckanext_files-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "ab5acccadd368ad21f3f8c54f6d98332",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 108601,
"upload_time": "2025-07-13T18:34:34",
"upload_time_iso_8601": "2025-07-13T18:34:34.113374Z",
"url": "https://files.pythonhosted.org/packages/27/f6/8a6174585bec5777cd46a91bb20bcebe9ab50d423939c66171c06f968db4/ckanext_files-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-13 18:34:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DataShades",
"github_project": "ckanext-files",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "ckanext-files"
}