Getting started with Kodexa using the Event Model Cookie Cutter
cookie-cutter-kodexa-event-model
is a project template that helps you quickly set up a new Kodexa event model with the right structure and dependencies. Event models in Kodexa allow you to handle and respond to specific events that occur within the Kodexa platform, providing a way to build custom event-driven functionality.
This documentation will guide you through:
model.py
handle_event
function that receives events from the Kodexa platform:
model.yml
eventAware: true
property, which indicates that this model can handle events.
pyproject.toml
makefile
make format
: Format code using isort and blackmake lint
: Lint code using flake8 and mypymake test
: Run formatting and lintingmake clean
: Clean up build artifactsmake deploy
: Deploy the model to Kodexa platformmake undeploy
: Undeploy the model from Kodexa platformhandle_event
function in model.py
. This function receives a BaseEvent
object that contains information about the event, including:
event.type
: The type of eventContentEvent
: A document has been created, updated, or deleted (this means the content of the document has changed)DocumentFamilyEvent
: A document family has been created, updated, or deletedTaskEvent
: A task has been created, updated, or deletedDataObjectEvent
: A data object has been created, updated, or deletedAssistantEvent
: An assistant has been created, updated, or deletedChannelEvent
: A channel has been created, updated, or deletedWorkspaceEvent
: A workspace has been created, updated, or deletedDataFormEvent
: A data form has been created, updated, or deletedOrchestrationEvent
: An orchestration has been created, updated, or deletedScheduledEvent
: A scheduled event has been triggeredpoetry shell
)poetry install
)