Interfaces
ITransmute
Main extension point of ckanext-transmute.
get_transmutation_schemas()
Register definitions of named schemas.
These schemas can be reffered by name in code. In this way you can define static schema and apply in multiple places it to arbitrary data.
Example
def get_transmutation_schemas(self):
person = {
"fields": {
"age": {"validators": ["int_validator"]},
"name": {"default": "John Doe"},
}
}
schema = {
"root": "person",
"types": {"person": person}
}
return {"person": schema}
RETURNS | DESCRIPTION |
---|---|
dict[str, dict[str, Any]]
|
Mapping with definitions of named schemas. |
get_transmutators()
Register custom transmutation functions.
Example
def get_transmutators(self):
return {
"tsm_title_case": tsm_title_case,
"tsm_is_email": tsm_is_email
}
RETURNS | DESCRIPTION |
---|---|
dict[str, Any]
|
Mapping with transmutaion functions. |