CKAN extension that exposes DSIF catalog discovery and search endpoints.
It provides:
- Health endpoint with DSIF version metadata
- DSIF manifest endpoint at
/.well-known/dataspace-catalog.json - Search endpoint that maps to CKAN
package_search
- CKAN: 2.11 (current target)
- Python: 3.10
GET /healthGET /.well-known/dataspace-catalog.jsonGET /search
To install ckanext-dsif:
-
Activate your CKAN virtual environment:
. /usr/lib/ckan/default/bin/activate -
Install the extension:
git clone https://github.com/SEAMWARE/ckanext-dsif.git cd ckanext-dsif pip install -e . pip install -r requirements.txt
-
Enable the plugin in CKAN config:
ckan.plugins = ... dsif ... -
Restart CKAN.
Values can be set via CKAN config (ckanext.dsif.*) or environment variables (CKANEXT_DSIF_*).
ckanext.dsif.catalog_id/CKANEXT_DSIF_CATALOG_IDckanext.dsif.sector/CKANEXT_DSIF_SECTORckanext.dsif.title/CKANEXT_DSIF_TITLEckanext.dsif.description/CKANEXT_DSIF_DESCRIPTION
ckanext.dsif.ttl_seconds- Default:
1800 - Minimum enforced value:
60 - Used for DSIF manifest cache header and payload TTL
- Default:
ckanext.dsif.impl_version- Optional implementation version in manifest payload
- Default: extension DSIF version (
0.1.0)
ckanext.dsif.origin_catalog_id- Used in
/searchhits asoriginCatalogId - Fallback:
ckan.site_url
- Used in
CKANEXT_DSIF_CATALOG_ID=ic-001
CKANEXT_DSIF_SECTOR=smart-cities
CKANEXT_DSIF_TITLE=Independent Catalog of Smart City Data
CKANEXT_DSIF_DESCRIPTION=This catalog contains datasets related to smart cities.GET /search supports:
qtypeformatpublisherkeywordpage(integer, >=1)pageSize(integer, 1..100)sort
Behavior:
- Invalid paging values return
400 - Invalid numeric parameters return
400 - Unexpected errors return
500 - Internally uses CKAN
package_searchwithignore_auth=True
git clone https://github.com/SEAMWARE/ckanext-dsif.git
cd ckanext-dsif
pip install -e .
pip install -r dev-requirements.txtRun all tests:
pytest --ckan-ini=test.iniRun unit tests only:
pytest --ckan-ini=test.ini ckanext/dsif/tests/unit-
Update version in
pyproject.toml -
Build and validate:
python -m build && twine check dist/* -
Upload to PyPI:
twine upload dist/* -
Commit and tag:
git commit -a -m "Release x.y.z" git push git tag x.y.z git push --tags