Mack's LoL Scout
Step 00

Setup + how do I run this thing?

Create a tiny CLI that greets you, accepts a Riot ID, and echoes it back without falling over.

Terminal setup commands

cd projects
uv init winterbreak
cd winterbreak
mkdir -p src/scout/ data/ reports/
touch src/scout/__main__.py
uv venv
code .
Run

Run after each small change. Tiny loops win.

uv run python -m src.scout
You will touch
  • src/scout/__main__.py
  • data/
  • reports/
Time

20–40 minutes

Do this (suggested order)

  1. Make folders: src/, data/, reports/.
  2. Create src/scout/__main__.py and print Scout online.
  3. Ask for a Riot ID with input(), .strip() it, then echo it back.
  4. Run uv run python -m src.scout until it works from a fresh terminal.

You’ll practice

  • Run Python modules via `python -m`
  • Use uv for dependencies (just enough to avoid pain)
  • Know when to use input() vs command-line args

Explainers (for context, not homework)

Build

Project skeleton
  • src/
  • data/
  • reports/
Entry point
  • Print a greeting
  • Ask for Riot ID with input()
  • Echo it back proudly

Check yourself

  • Command `uv run python -m src.scout` prints “Scout online”, asks for Riot ID, and echoes it.

If it breaks

  • Running the wrong file path (double-check you are in the project folder)
  • Mixing up src/scout.py vs src/scout/__main__.py
  • Launching with the wrong working directory

Hints (spoilers)

Hint: keep folders boring (boring = fast)

Keep it boring: src/, data/, reports/. If you add folders, name them like a responsible adult. Chaos gremlins fear boring names.

Bigger hint: what “python -m” is actually doing

python -m src.scout means: “Find a package named src, then a subpackage named scout, then run src/scout/__main__.py.”

Minimum file structure that makes -m happy

src/
  scout/
    __main__.py
Unblock-me: “No module named src” (it’s almost always your folder)

You’re probably running the command from the wrong directory. The command should be run from the folder that contains src/.

Quick self-checks

pwd
ls
# do you see src/?

If it still complains about packages, add empty __init__.py files to make the folders “official” packages.

Package nudge (optional)

src/__init__.py
src/scout/__init__.py
Bigger hint: future-proof Riot ID input

Make Riot ID come from one place: “if args exist use args else ask with input()”. You don’t need argparse today—you need the idea today.

The idea (not the full code)

riot_id = input('Riot ID (Name#TAG): ').strip()
if '#' not in riot_id:
  raise ValueError('Expected Riot ID like Name#TAG')
VS Code Run button (optional): make it run the right thing

Easiest path: open src/scout/__main__.py and hit the Run ▶ button. Early on, that’s basically equivalent to python -m src.scout.

If you want a one-click “run the module” button, add a VS Code launch config that runs the module and uses your project’s interpreter:

.vscode/launch.json (minimum)

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Run scout",
      "type": "python",
      "request": "launch",
      "module": "src.scout",
      "cwd": "${workspaceFolder}",
      "console": "integratedTerminal"
    }
  ]
}

In VS Code, select your interpreter as the project one (usually .venv) via “Python: Select Interpreter”. If you don’t have one yet, run uv venv once (it creates .venv/), then select it.

What “done” looks like

Run command

Use this every step. It’s your “start game” button.

uv run python -m src.scout

Expected files (for now)

src/
  scout/
    __main__.py

data/
reports/

Expected terminal vibe

Scout online
Riot ID (Name#TAG): Mack#NA1
Got it: Mack#NA1