Recap of Last Time

In Part 6, we covered Stripe CLI. This time, we're talking about our second language: Python.

What Is Python — A Very Brief Explanation

Python = a general-purpose programming language that excels at AI, data analysis, image processing, and more.

It's a separate language from the Node.js (JavaScript) we introduced in Part 2. You might wonder, "Why do I need two languages?" The answer is simple: they excel at different things.

👨
Why do I need Python if I already have Node.js?
🟠
Node.js is great for web apps and servers. Python is great for image processing and text-to-speech. Think of it like having different sized wrenches in your toolbox.

Why You Need It — The Best Tool for Quick Utility Tasks

The core of the Kagemusha system runs on JavaScript (Node.js / GAS). But during development, needs arise like "I want to remove an image background" or "I want to generate audio from text" — tasks separate from the main application.

For these kinds of tasks, Python libraries are by far the easiest solution.

How to Install

Download from the official Python website.

https://www.python.org/downloads/

During installation, make sure to check "Add Python to PATH." If you forget this, you won't be able to use the python command from the terminal.

python --version
# Python 3.12.x  ← If you see something like this, you're good

Python's package manager is pip (the Python equivalent of npm).

pip install package-name

My Top 3 Handy Libraries

1. edge-tts — Generate Audio from Text

pip install edge-tts

Pass in text, and it generates a natural-sounding audio file (mp3). You get the same quality as Microsoft Edge's read-aloud feature with a single command.

edge-tts --text "Hello, this is the Kagemusha system" --voice ja-JP-NanamiNeural -f output.mp3

In the Kagemusha system, we use this to generate character voices.

2. rembg — Remove Image Backgrounds

pip install rembg

Automatically makes photo or illustration backgrounds transparent. No need to open Photoshop — just one command for background removal.

rembg i input.png output.png
Before

Open Photoshop for background removal → layer operations → export → 10 minutes

After

rembg i input.png output.png → Done in 5 seconds. And with high accuracy

3. Pillow — The Swiss Army Knife of Image Processing

pip install Pillow

Resizing, cropping, text overlay, format conversion — it handles virtually any image processing task. It's invaluable when creating thumbnail images for landing pages and blog posts.

edge-tts
Text → Audio
rembg
Background Removal
Pillow
General Image Processing

pip install Cheat Sheet

Just like npm, usage is straightforward.

# Install a package
pip install package-name

# Install a specific version
pip install package-name==1.0.0

# List installed packages
pip list
npm vs. pip Comparison
npm install -g package-namepip install package-name
npm list -gpip list
npm uninstall -g package-namepip uninstall package-name
The concept is the same. Only the command names differ.

Next Time

Next time is the final installment. We'll compile all the tools covered across all 8 parts into a single table and sort out "What should a non-coder install first?"

Series: A Non-Coder's Dev Environment
Part 1: Claude Code
Part 2: Node.js & npm
Part 3: Git
Part 4: Google Apps Script & clasp
Part 5: Cloudflare Workers & wrangler
Part 6: Stripe CLI
Part 7: Python & Handy Libraries
Part 8: Wrap-Up — The Big Picture & How to Choose

Still managing tutor attendance manually?

Discover Kagemusha System