Extension Switzerland NG


Extension Basics

Title
Switzerland NG
Name
ckanext-switzerland-ng
Type
Public extension
Description
Next-generation CKAN extension for DCAT-AP Switzerland providing templates and plugins for opendata.swiss with support for CKAN 2.11+.
CKAN versions

~2.11

Show details

These CKAN Versions are exactely matched:

Download-Url (zip)
Last commit
a month ago (2026-02-05 00:00:00)
Url to repo
Category
Standards Compliance


Background Infos

Description (long)
Show details

ckanext-switzerland

CKAN extension for DCAT-AP Switzerland, templates and different plugins for opendata.swiss.

Requirements

  • CKAN 2.11+
  • ckanext-scheming
  • ckanext-fluent

Installation

  1. Activate your CKAN virtual environment
  2. Install the ckanext-switzerland-ng Python package: git clone https://github.com/opendata-swiss/ckanext-switzerland-ng.git cd ckanext-switzerland-ng pip install -e .
  3. Add relevant plugins to the ckan.plugins setting. This package contains several plugins. See project.entry-points."ckan.plugins" in pyproject.toml for an up-to-date list.
  4. Restart CKAN

Config Settings

See ckanext/switzerland/config_declaration.yaml.

Development Installation

git clone https://github.com/opendata-swiss/ckanext-switzerland-ng.git
cd ckanext-switzerland-ng
pip install -e .[dev]

Update Format-Mapping

To update the Format-Mapping edit the format-mapping.yaml, following the YAML-Syntax.

Update Translations

To generate an updated ckanext-switzerland.pot file inside the Docker container:

docker-compose exec ckan bash
source /usr/lib/ckan/venv/bin/activate
cd /usr/lib/ckanext/ckanext-switzerland-ng/
python setup.py extract_messages

Add Users as Members to Groups

For opendata.swiss we use groups in the sense of categories. Users with the role admin are automatically added as admin to each group.

curl {ckan_url}/api/3/action/ogdch_add_users_to_groups?user_id=greta.mayer&group_id=administration
curl {ckan_url}/api/3/action/ogdch_add_users_to_groups?group_id=administration
curl {ckan_url}/api/3/action/ogdch_add_users_to_groups?user_id=greta.mayer
curl {ckan_url}/api/3/action/ogdch_add_users_to_groups

License

AGPL-3.0

Version
1.0.0
Version release date
2026-02-02
Contact name
Liip AG
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Successor to ckanext-switzerland. Requires ckanext-scheming, ckanext-fluent. Supports Python 3.8-3.10.

Plugins to configure (ckan.ini)
ogdch ogdch_pkg ogdch_res ogdch_group ogdch_org ogdch_showcase ogdch_archive ogdch_subscribe ogdch_middleware ogdch_xloader
CKAN Settings (ckan.ini)
# ckanext.switzerland.env =
# ckanext.switzerland.switch_connectome_base_url =
# ckanext.switzerland.date_picker_format = %d.%m.%Y
# ckanext.switzerland.send_email_on_user_registration = true
# ckanext.switzerland.api_limit_calls_per_interval = 2
# ckanext.switzerland.api_limit_interval_in_seconds = 300
# ckanext.switzerland.showcase_admin_name =
# ckanext.switzerland.showcase_admin_email =
# ckanext.switzerland.frontend_url =
DB migration to be executed
(not set)
<< back to Extensions