Skip to content

Interfaces

ICollection

Extend functionality of ckanext-collections.

Example
import ckan.plugins as p
from ckanext.collection import shared

class MyPlugin(p.SingletonPlugin):
    p.implements(shared.ICollection, inherit=True)

    def get_collection_factories(self) -> dict[str, CollectionFactory]:
        return {...}

get_collection_factories()

Register named collection factories.

Example
def get_collection_factories(self) -> dict[str, CollectionFactory]:
    return {
        "packages": PackageCollection,
    }
RETURNS DESCRIPTION
dict[str, CollectionFactory]

mapping of global collection name to collection factory