This component lets you run custom Python code directly in Keboola. Use it to call external APIs, process files, push data to third-party systems, or build any integration that isn’t covered by an existing connector — all without leaving Keboola.

| Scenario | Use |
|---|---|
| Transform or aggregate data already in Keboola Storage | Python Transformation |
| Connect to an external API or service, download or push data | Custom Python |
| Store and use sensitive credentials (API keys, passwords, tokens) | Custom Python |
| Share logic across multiple Keboola projects | Custom Python |
# prefix.Create a new configuration of the Custom Python application.

Select the Python version for your code:
ⓘ Tip
Use an isolated environment (Python 3.12 or newer) to avoid package version conflicts and keep your code maintainable.
Choose where your Python code comes from:
Enter manually into text areas below (default)

Write or paste your code directly in the Keboola UI. Use the Python Packages field to list any extra packages to install.
Get from Git repository
Load code from a public or private Git repository. See Git Configuration below.

Use User Parameters to pass configuration values to your code — for example an API base URL, a target table name, or debug flags. Enter them as a JSON object.
Any key starting with # (e.g., #api_key) will be encrypted when you save the configuration.
The decrypted value is available to your code at runtime via CommonInterface.
When using Get from Git repository as your code source, fill in the repository settings:

main. Use List Branches to pick from the repository.main.py. Use List Files to pick from the repository.Place your dependency file in the repository root:
pyproject.toml + uv.lock (recommended) — Modern approach using uv.requirements.txt — Legacy approach.If both are present, pyproject.toml + uv.lock takes precedence.
Your code communicates with Keboola Storage and configuration via the
keboola-component Python library and CommonInterface.
The following snippet is pre-filled in every new configuration and shows the basic pattern:
from keboola.component import CommonInterface
ci = CommonInterface()
# Access user parameters defined in the configuration
print(ci.configuration.parameters)
For the full CommonInterface reference — including reading input tables, writing output tables,
working with files, state files, error handling, and logging — see the
Developer Documentation.
Kai, Keboola’s AI assistant, can help you set up and work with the Custom Python component directly from the Keboola UI. Open Kai in your project and describe what you need — for example:
Kai understands the Custom Python component’s configuration, the CommonInterface library,
and Keboola best practices. It can generate code snippets, configure user parameters with
encrypted credentials, set up Git repository integration, and troubleshoot failed jobs —
all within the chat.
ⓘ Tip
When asking Kai to build a Custom Python configuration, be specific about the external service, authentication method, and which tables or files you want to read or write. The more context you provide, the better the result.
We have prepared a simple example project to help you get started with running code from a Git repository. It can also serve as a template for your own projects.