From scripts to reliable tools / CORE PATH
Command lines, config & logging
Make a script runnable by you, CI, or an orchestrator.
n8n can call a deliberate CLI contract with visible exit status.
Understand the idea
Make a script runnable by you, CI, or an orchestrator. n8n can call a deliberate CLI contract with visible exit status.
Work through the practice with a tiny fixture, predict the result before running it, and record one boundary case. Use the exit check as evidence before moving on.
What to learn
- Parse arguments with argparse.
- Send summary output to stdout and diagnostic logs to stderr.
- Use environment variables for credentials; never commit secrets.
Practice on your own data
Explain every argument of python -m projects.pipeline --help.
Practice this lesson in the Python lab →
EXIT CHECK
A new terminal can run the tool and distinguish input failure from a valid empty result.
Prerequisites
Sources and further reading
- Python language tutorial ↗Official documentation
Track progress on this topic → · Markdown source ↗
Next lesson: Build 01 · EGP expense ledger →