Creating new Data Pipelines from the command line
Tags: kedro, python, datascience
Published: 2021-09-27 20:03:44

---
title: Creating new Data Pipelines from the command line
published: true
series: kedro
tags:
- kedro
- python
- datascience
canonical_url: https://waylonwalker.com/kedro-new/
cover_image: https://images.waylonwalker.com/kedro-new-dev.png
---

{% youtube uqiv5LAiJe0 %}

Kedro new is simply a wrapper around the cookiecutter templating library.  The kedro team maintains a ready made template that has everything you need for a kedro project.  They also maintain a few kedro starters, which are very similar to the base template.


{% post waylonwalker/what-is-kedro-5b3h/ %}


> Unsure what kedro is, Check out yesterdays post on What is Kedro.

## pipx

I recommend using `pipx` when running kedro new.  `pipx` is designed for system level cli tools so that you do not need to maintain a virtual environment or worry about version conflicts, `pipx` manages the environment for you.

The kedro team does not recommend `pipx` in their docs as they already feel like there is a bit of a tool overload for folks that may be less familiar with.

``` python
pipx kedro new
```

I like using `pipx` as it gives you better control over using a specific version or always the latest version, unlike when you run what you have on your system depends on when you last installed or upgraded.

## Kedro New

The kedro team also has a set of starters, by passing in `--starter` you can start with a different template.  Here is an example with the kedro spaceflights starter.

``` bash
pipx run kedro new --starter spaceflights

=============
Please enter a human readable name for your new project.
Spaces and punctuation are allowed.
 [New Kedro Project]: Spaceflights Complete

Repository Name:
================
Please enter a directory name for your new project repository.
Alphanumeric characters, hyphens and underscores are allowed.
Lowercase is recommended.
 [spaceflights-complete]:

Python Package Name:
====================
Please enter a valid Python package name for your project package.
Alphanumeric characters and underscores are allowed.
Lowercase is recommended. Package name must start with a letter
or underscore.
 [spaceflights_complete]:

Change directory to the project generated in /home/u_walkews/git/spaceflights-complete

A best-practice setup includes initialising git and creating a virtual environment before running ``kedro install`` to install project-specific dependencies. Refer to the Kedro documentation: https://kedro.readthedocs.io/
```

### Other versions of kedro with pipx

`pipx` not only ensures that you run  the latest version, it can also run a very specific version.

``` bash
pipx run --spec kedro==0.16.6 kedro new
```

https://waylonwalker.com/kedro-environment/

> The next post in this series will help you create your virtual environment for your new kedro project.

---

## Check Out These Related Posts


{% post waylonwalker/data-engineering-in-the-terminal-how-i-kedro-1f6l %}

---

## Connect with Me

I am trying to build my [YouTube@waylonwalker](https://youtube.com/waylonwalker) channel I would greatly appreciate a sub.

Connect with me on [twitter@_waylonwalker](https://twitter.com/_WaylonWalker).

I stream a few times per week on [twitch@waylonwalker](https://www.twitch.tv/waylonwalker).

Check out all of my public repos on [github@waylonwalker](https://github.com/waylonwalker/).

Stay up to date by joining the [newsletter](https://waylonwalker.com/newsletter) if that's your thing.

Connect on [LinkedIn@waylonwalker](https://www.linkedin.com/in/waylonwalker/).

Follow me on [Dev.to@waylonwalker](https://dev.to/waylonwalker).