Cookiecutter template for Keboola Python component creation with GitHub Actions CI.
You can use this template with just the cookiecutter installed or you can clone this whole repository to your drive so uv can handle cookiecutter installation for you.
- Prerequisite: Install cookiecutter
- Run
cookiecutter gh:keboola/cookiecutter-python-component
- Prerequisite: Install uv 💜
- Clone the repository
- Run
make run(which will install cookiecutter in a venv and run it just like above)
- Enter the desired parameters (those marked with ❗ are mandatory):
repository_url– URL of your repository, if filled in the template git repository is initialised and remote set to your repository.- ❗
component_name– Name of your component dev_portal_vendor_name– Vendor name for publishing on Keboola Developer Portal. Default value iskeboola.dev_portal_component_id– Component ID for publishing on Keboola Developer Portal. Defaults to normalized component name.repository_folder_name– Name of the destination folder. Defaults to prefixed & normalized component name.
- Set up CI environment variables (see the CI Setup section)
- Navigate to newly created folder and run
git push. The CI pipeline (action) should be now executed. If you add a tag to the commit, component will be pushed to your Developer Portal. - Modify the code in
src/component.pyas you like.- You can set the configuration parameters in
data/config.json - You can execute the component via normal local environment without docker installed.
- Set any additional dependencies for your project in
requirements.txt
- You can set the configuration parameters in
- Check that the workflows are enabled.
The actions are present in
.github/workflows/folder. - Set
KBC_DEVELOPERPORTAL_APPenv variable (dev portal app id)
In case it is not set on the account level, set also other required dev portal env variables:
- `KBC_DEVELOPERPORTAL_PASSWORD – service account password
- `KBC_DEVELOPERPORTAL_USERNAME – service account username
- `KBC_DEVELOPERPORTAL_VENDOR – dev portal vendor
- `KBC_STORAGE_TOKEN – (optional) in case you wish to run KBC automated tests
