Prerequisites:
- This is a Python library and you definitely need to have Python 3.9 or newer.
- You will also require Git 2.27 or newer
Then, you can install copier by running the command:
pip install copierIf you're having some problems installing, you can read more about the installation steps on the copier website
In a terminal of choice (I'm just using Windows CMD), run the following command (I'll break it down below)
python -m copier copy gh:/data-tree-house/py-template path/to/destination/folderA breakdown of what we're doing:
python -m copierwill run thecopierlibrary as a module (-m)- We're running the
copycommand. The next two arguments are thesrc(source) anddest(destination) - Our source will be a Github Repository (
gh:/). More specifically, we're copying from thedata-tree-house/py-templaterepository. - Our destination is simply the path to our project. If your terminal is already in your project folder, you can simply pass a dot (
.) to say "where I am right now" or you can give the path to a folder. The folder does not have to exist! The library will create the folder for you
Here's an example of how I do it. First I change directory to where I keep all my projects:
cd C:\Users\johan\OneDrive\Documents\00_local_repos\then I run the command
python -m copier copy gh:/data-tree-house/py-template coffee-analysisand it will create a folder called coffee-analysis for me!
After you run this command, a series of questions will be asked. You can have a look at all the questions in the copier.yml file.