1 minute read

I am going to spin-up a new python project. I am going to use create-python-app and see how that goes.

Installation

Following the steps in the readme, I first installed using the following:

curl -sSL https://raw.githubusercontent.com/ysawa0/create-python-app/main/install.sh | bash

Ran it with the following output:

> curl -sSL https://raw.githubusercontent.com/ysawa0/create-python-app/main/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1064k  100 1064k    0     0  3445k      0 --:--:-- --:--:-- --:--:-- 3445k
Archive:  /Users/xxx/bin/cpa-macOS.zip
  inflating: /Users/xxx/bin/cpa  
cpa installed to /Users/xxx/bin/cpa

Path

Following instructions, I added it to path:

echo "export PATH=$PATH:~/bin" >> ~/.zshrc

Create new project

> cpa create --name sample-project
Creating project with name: sample-project
Using preset: "python3.10" 
Project created at: ./sample-project

Easy enough!

So.. what did it do?

Created a new project with:

  • main.py with hello world
  • Makefile that sets up pre-commit, hooks, shfmt, and spellcheck on either macos or linux
  • Dockerfile
  • github actions
  • .vscode extensions

Verdict

Not bad. I may, for my projects, prefer some extra steps: ./test directory with at least one unit test requirements.txt. requirements_dev.txt Include depedencies for unit test framework make commands for installing dependencies, formatting, linting