betty.porters.callback module

Porters using callbacks.

final class betty.porters.callback.CallbackPorter

Bases: Porter, Generic

Make data portable using a separate loader and dumper.

__init__(loader: Callable[[PortableData], DataClsT], dumper: Callable[[DataClsT], PortableDataT], /)
dump(data: DataClsT) PortableDataT

Dump data to its portable form.

load(portable: PortableData) DataClsT

Load data from its portable form.