Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.Create a main
analyzer.py file with your enrichment logic. The easiest method for this (and enrichment modules are fairly small) is to find an example module, and use it as a base with a LLM to help draft your code.
If your module needs additional dependencies, you have two options. Before either, first install Poetry.
For the first option, you can cd to projects/file_enrichment or libs/file_enrichment_modules/ and run poetry add X for the needed library.
Alternatively (and easier) you can create a pyproject.yaml in the new module module folder. An example is:
poetry add X to add a new library. The dynamic module loader will install the necessary dependencies in a Poetry env for just that module.
Tips / Tricks
Theshould_process() function determines if the module should run on a file. You can either check the name or any other component of the base enriched file with file_enriched = get_file_enriched(object_id):
On Transforms
File transforms require atype (used as a title for display) and an object_id to reference the data to display.
Optional metadata is:
Display Types are: