Skillipedia article

Python Automation

Write small, reliable scripts to move files, scrape pages, and orchestrate tasks.

Why it matters

Automation removes toil and reduces human error.

Core steps

  • Use the standard library first (pathlib, subprocess, csv).
  • Isolate configuration via environment variables and .env files.
  • Add logging instead of print for traceable runs.
  • Package scripts with argparse or typer for friendly CLIs.

Example snippet

from pathlib import Path

def rename_files(folder: Path):
    for file in folder.glob("*.txt"):
        file.rename(file.with_suffix(".md"))