Click on Use this template to copy Tracecat's custom integrations starter kit.
Then check out the custom registry installation docs.
This starter kit contains:
pyproject.tomlconfig file- Example Python UDFs (user defined functions) in
mapping.pyandgreetings.py - An example Action Template in
custom_actions/templates/power_of_three.yml.
Note:
- When setting your git URL, the correct scheme is:
git+ssh://git@github.com/<username>/<repo>.git(notice the "/" not ":") - You can safely delete example Python integrations files and templates under
custom_actions/ - Do not remove
pyproject.toml. This is required for your Tracecat instance to install and run your custom integrations. - You can add 3rd party
pippackages (e.g.psycopg==3.2.4) in thepyproject.tomlfile underproject.dependencieshere. - The
devdependencies line inpyproject.tomlinstalls thetracecat_registrypackage. This allows you to test your Python functions locally and also enables linting.
If you want to rename custom_actions to <your_registry_name>, you must:
- Pick a package name that is in snakecase
- Rename the
custom_actionsdirectory to<your_registry_name> - Change every
custom_actionsdirectory name inpyproject.tomlto<your_registry_name>
For example:
cd custom-integrations-starter-kit
mv custom_actions my_custom_integrations
sed -i 's/custom_actions/my_custom_integrations/g' pyproject.toml