composio Python package.
Installation
Classes
Quick Start
Decorators
before_execute
View sourceafter_execute
View sourcebefore_file_upload
Build aModifier for the file-upload hook (same scoping pattern as before_execute). Your callable may take either: - a single context argument (BeforeFileUploadContext) — the preferred form, exposes context["source"] ("path" or "url"), or - three positional arguments (path, tool, toolkit) — legacy form, kept for back-compat. Return a new path/URL string to substitute, or False to abort the upload (raises FileUploadAbortedError). Pass the returned Modifier in modifiers=[...] on composio.core.models.tools.Tools.execute or tools.get. Multiple such modifiers are composed in list order.
View source