Getting started with Kodexa using the Transformer Model Cookie Cutter
cookie-cutter-kodexa-transformer-model
is a project template that helps you quickly set up a new Kodexa transformer model project with the right structure and dependencies. Transformer models in Kodexa are designed to process documents and transform the extracted data according to your business needs. The template creates a model that can be deployed to a Kodexa platform and integrated into document processing pipelines.
This documentation will guide you through:
model.py
infer
function that:
transformer.py
Transformer
class:
data_classes.py
model.yml
makefile
make format
: Format code using isort and blackmake lint
: Lint code using flake8 and mypymake test
: Run formatting, linting, and unit testsmake deploy
: Deploy the model to Kodexa platformmake undeploy
: Undeploy the model from Kodexa platformmake generate-data-classes
: Generate data classes from the taxonomymake generate-data-classes
, the Kodexa CLI will:
data_classes.py
transformer.py
. The main class is Transformer
with a process_document
method:
# Implement the logic to transform the data objects
.
data_classes.py
. Let’s assume the taxonomy includes classes like Invoice
, LineItem
, and Vendor
.
make generate-data-classes