Kedro starters¶
A Kedro starter contains code in the form of a Cookiecutter template for a Kedro project. Using a starter is like using a pre-defined layout when creating a presentation or document.
How to use a starter¶
To create a Kedro project using a starter, apply the --starter
flag to kedro new
. For example:
kedro new --starter=<path-to-starter>
Note
path-to-starter
could be the path to a local directory, a URL to a remote VCS repository supported by cookiecutter
or one of the aliases listed in kedro starter list
.
If you want to use --starter
as remote VCS repository, run:
kedro new --starter git+https://github.com/kedro-org/kedro-starters.git --directory spaceflights-pandas
Starter aliases¶
We provide aliases for common starters maintained by the Kedro team so that you don’t have to specify the full path. For example, to create a project using the spaceflights-pandas
starter:
kedro new --starter=spaceflights-pandas
To list all the aliases we support:
kedro starter list
Official Kedro starters¶
The Kedro team maintains the following starters for a range of Kedro projects:
astro-airflow-iris
: An example project using the Iris dataset with a minimal setup for deploying the pipeline on Airflow with Astronomer.databricks-iris
: An example project using the Iris dataset with a setup for Databricks deployment.spaceflights-pandas
: The spaceflights tutorial example code withpandas
datasets.spaceflights-pandas-viz
: The spaceflights tutorial example code withpandas
datasets and visualisation and experiment trackingkedro-viz
features.spaceflights-pyspark
: The spaceflights tutorial example code withpyspark
datasets.spaceflights-pyspark-viz
: The spaceflights tutorial example code withpyspark
datasets and visualisation and experiment trackingkedro-viz
features.
Archived starters¶
The following Kedro starters have been archived and are unavailable in Kedro version 0.19.0 and beyond.
The latest version of Kedro that supports these starters is Kedro 0.18.14.
To check the version of Kedro you have installed, type
kedro -V
in your terminal window.To install a specific version of Kedro, e.g. 0.18.14, type
pip install kedro==0.18.14
.To create a project with one of these starters using
kedro new
, type the following (assuming Kedro version 0.18.14)kedro new --starter=pandas-iris --checkout=0.18.14
(for example, to use thepandas-iris
starter).
Starter versioning¶
By default, Kedro will use the latest version available in the repository. If you want to use a specific version of a starter, you can pass a --checkout
argument to the command:
kedro new --starter=spaceflights-pandas --checkout=0.1.0
The --checkout
value can point to a branch, tag or commit in the starter repository.
Under the hood, the value will be passed to the --checkout
flag in Cookiecutter.
Use a starter with a configuration file¶
By default, when you create a new project using a starter, kedro new
asks you to enter the project_name
, which it uses to set the repo_name
and python_package
name. This is the same behaviour as when you create a new empty project
Kedro also allows you to specify a configuration file when you create a project using a Kedro starter. Use the --config
flag alongside the starter:
kedro new --config=my_kedro_project.yml --starter=spaceflights-pandas
This option is useful when the starter requires more configuration than the default mode requires.
Create a custom starter¶
You can build your own starters for reuse within a project or team, as described in the how to create a Kedro starter documentation.
To create a project from a custom starter, run:
kedro new --starter=<path-to-starter> --directory <directory>