Custom Libraries
Custom Libraries lets an Admin upload their own pure-Python library (a .whl wheel file) and make it import-able from any Enrichment or Cron script, exactly like the small set of built-in modules (re, json, requests, ...) already available there. Available on the Plus and Pro plans.
Why you'd use this
Enrichment and Cron scripts run in a restricted sandbox with a fixed, small set of importable modules — enough for typical lookups and normalization, but not a general-purpose Python environment. If a script genuinely needs a real package (a geocoding library, a specialized parser, a domain-specific helper you already maintain), Custom Libraries is how it gets there without waiting on a platform update.
Where in the UI
Settings → Custom Libraries (Admin-only). On the Free plan the tab is visible but disabled, with a note that it needs Plus or Pro — the same pattern Google Sign-In uses.
Installing a library: Check → preview → Approve
Every file goes through the same three-step flow — the very first version of a library, and every later version too. Nothing is installed until you've seen exactly what a specific file declares and explicitly accepted the risk for it.
1. Choose a display name and a file
Give the library a display name and pick a .whl file. The module name (what you'll import) is read automatically from the file itself once it's checked — there's no separate field to type it into.
2. Click "Check module"
This reads the wheel and shows a preview: the module name it actually declares, its version, and its size — plus the risk notice every install requires you to acknowledge before "Approve & Install" becomes clickable.
As of the latest version, this step also checks every .py file inside the wheel for Python syntax errors (a lightweight parse-only check — nothing in the file is ever executed) and surfaces the offending file/line right here if it finds one. It's a narrower guarantee than it might sound: it catches a genuinely broken or corrupted upload, not every possible bug — a working Test run in the Enrichments/Cron editor is still the real proof a library behaves the way you expect.
3. Tick the box and Approve & Install
Only now is the file actually written and made available for import. The same page shows every installed library with a copyable import <name> snippet, a version dropdown, "Add version," and Delete.
Using it from a script
Once installed, the module name is importable exactly like a built-in one:
import my_geocoder def enrich(event): zip_code = event["metadata"].get("zip") event["metadata"]["region"] = my_geocoder.lookup_region(zip_code) return event
Both the Enrichments and Cron script editors have an "Available custom libraries" info button next to the code field, listing every installed module name and its currently active version:
Testing a script that imports a custom library works the same way as any other Enrichment/Cron test — write the code, click Test. The currently active version of any library the code imports is attached automatically, no separate setup needed.
Publishing a new version
Uploading a newer version of an already-installed library (through the same Check → preview → Approve flow, via that library's "Add version") doesn't switch live processing over immediately. Use the version dropdown on that library's row to publish which version is active; picking a version that's already running in a live worker process requires restarting it to take effect — the page shows the exact command to run once you publish a change:
docker compose restart chomper-python-worker chomper-cron-worker chomper-enrichment-api chomper-cron-api
Until that restart happens, live event/cron processing keeps using whichever version it already loaded. The editor's own Test button is not affected by this — it always reflects the currently published version immediately, which makes it a fast way to check what a version switch actually changed before restarting anything.
What to know before uploading
- Only a pure-Python wheel is accepted — a package that ships compiled/native code isn't supported.
- Chomper does not scan, review, or vet what you upload. A malicious or compromised package behaves exactly like code you wrote yourself — only install something you trust.
- A library's module name is fixed once its first version is installed; it can't collide with another already-installed library's name or with a module the sandbox already provides.
Last updated 28 July 2026