ckanext-storage
Advance Deprecation Notice: as of CKAN v1.6 (expected Feb 2012), this extension and its storage capabilities will have been merged into CKAN core.
This extension adds ‘blob’ storage capabilities to CKAN along with:
- Some new methods to the CKAN API for dealing with storage
- A /storage/upload page to web interface for doing file uploads
It uses OFS (http://packages.python.org/ofs/) to talk to the backing storage so can support anything that OFS supports including local filesystem, S3, Google Storage etc.
Installation
Install the extension:
pip install ckanext-storage
Note that for use of S3-like backends you will need boto. For local filesystem backend you need pairtree (pip install pairtree).
In your config you need something like:
ckan.plugins = storage
## OFS configuration (Google Storage example)
ofs.impl = google
ofs.gs_access_key_id = GOOGCABCDASDASD
ofs.gs_secret_access_key = 134zsdfjkw4234addad
ckanext.storage.bucket = ....
# ckanext.storage.max_content_length = 1000000000
# ckanext.storage.key_prefix = file/
For local file storage:
ofs.impl = pairtree
ofs.storage_dir = /my/path/to/storage/root/directory
Upload Web Interface
Direct upload available as part of dataset resource creation process (as of CKAN v1.5). Also a new upload page at /storage/upload.
Metadata API
/api/storage/metadata/{label} - GET, POST, PUT for metadata.
Auth API
Request Authentication at /api/storage/auth/request/{label}, Form Authentication at /api/storage/auth/form/{label}.
License
AGPL