Google IT Automation with Python study materials
Google IT Automation with Python study resources

Google IT Automation with Python key terms

Google IT Automation with Python · Get comfortable with the vocabulary.

Interpreter

A program that reads source code and executes it one statement at a time, without a separate compile step. CPython is the standard implementation used to run .py files and interactive sessions.

Related: REPL, Bytecode
REPL

Read-Eval-Print Loop: an interactive session that reads one expression, evaluates it, prints the result, and repeats. Useful for quick experiments, checking types, and testing small snippets before scripting.

Related: Interpreter
Bytecode

An intermediate instruction set the interpreter compiles source into and then executes on the Python virtual machine. Cached bytecode lives in pycache folders and explains why first runs are slower.

Related: Interpreter, Virtual environment
List

An ordered, mutable sequence holding items of any type, written with square brackets. Supports indexing, slicing, appending, and sorting, making it the default container for collected results.

Related: Dictionary, Tuple
Tuple

An ordered, immutable sequence written with parentheses. Because it cannot change, it can be used as a dictionary key and is a safe way to return multiple values from a function.

Related: List, Dictionary
Dictionary

A mutable mapping of unique hashable keys to values, written with braces. Lookups are fast by key rather than position, which suits configuration data and counting occurrences.

Related: List, Set
Set

An unordered collection of unique hashable elements. Membership tests are fast, and set operations such as union, intersection, and difference make it useful for comparing groups of items.

Related: Dictionary, List comprehension
List comprehension

A compact expression that builds a list from an iterable in one line, optionally filtering with a condition. It replaces simple for-loop-and-append patterns and is often faster and more readable.

Related: Generator, List
Generator

A function containing yield that produces values lazily, one at a time, instead of building a full list in memory. Useful for streaming large files or log lines without exhausting RAM.

Related: Iterator, List comprehension
Iterator

An object returned by iter() that yields items one at a time through next and raises StopIteration when exhausted. For loops consume iterators implicitly, which is why a spent iterator yields nothing more.

Related: Generator, Iterable
Iterable

Any object a for loop can walk over, such as a list, string, dictionary, or file handle. It produces a fresh iterator via iter(), so it can be looped over repeatedly unlike a spent iterator.

Related: Iterator, Generator
Exception handling

Using try, except, else, and finally blocks to respond to runtime errors instead of crashing. Catch only the specific exception types you can handle, and log or re-raise the rest.

Related: Traceback, Assertion
Traceback

The report Python prints when an unhandled exception escapes, listing each call frame from outermost to innermost plus the exception type and message. Reading the last frame first usually locates the fault.

Related: Exception handling, Logging
Module

A single .py file whose top-level names can be imported by other code. Importing runs the file once and caches it in sys.modules, so module-level side effects happen only on first import.

Related: Package, Virtual environment
Package

A directory of modules, normally marked by an init.py file, that gives code a dotted import namespace such as myapp.utils. Distinguishes installable distributions from single-file modules.

Related: Module, pip
Virtual environment

An isolated directory holding its own Python interpreter links and installed packages, created with python -m venv. Prevents project dependencies from conflicting with system packages and keeps deployments reproducible.

Related: pip, requirements.txt
pip

The standard package installer for Python, fetching distributions from an index such as PyPI. Commands include install, uninstall, freeze, and list, and it should normally run inside an activated virtual environment.

Related: Virtual environment, requirements.txt
requirements.txt

A plain-text file listing package names and optional version pins that pip install -r can reproduce. Generated with pip freeze, it documents exact dependencies so another machine or CI job builds the same environment.

Related: pip, Virtual environment
Command-line arguments

Values passed to a script after its name, read from sys.argv or parsed with argparse. argparse adds flags, defaults, types, and help text, which is preferred for anything beyond trivial scripts.

Related: Exit code, Standard streams
Standard streams

The three default channels stdin, stdout, and stderr that a process reads input from and writes output and errors to. Scripts should print diagnostics to stderr so piped stdout stays clean.

Related: Piping, Logging
Exit code

An integer a process returns to its parent on termination, where zero conventionally means success and nonzero means failure. Shells, schedulers, and CI systems branch on this value, so scripts must set it deliberately.

Related: subprocess, Command-line arguments
Piping

Connecting one process's stdout to another's stdin with the shell | operator, forming a pipeline. Each stage runs concurrently, and the final stage's exit status is what the shell normally reports.

Related: Standard streams, subprocess
subprocess

A standard library module for launching external programs and capturing their output, arguments, and exit status. Preferred over os.system because it avoids shell injection and gives explicit control over streams.

Related: Exit code, Piping
os module

Standard library interface to the operating system, covering environment variables, directory listing, path checks, permissions, and process identifiers. Many path tasks now have cleaner equivalents in pathlib.

Related: pathlib, Environment variable
pathlib

An object-oriented standard library module for filesystem paths, offering methods such as exists, is_file, mkdir, and glob. Handles separators portably and replaces much manual string joining with os.path.

Related: os module, Glob
Glob

Pattern matching for filenames using wildcards like * and ?, available through glob.glob or Path.glob. Returns matching paths, often used to batch-process files such as all .log files in a directory tree.

Related: pathlib, os.walk
os.walk

A generator that yields a tuple of directory path, subdirectory names, and filenames for every folder beneath a starting point. The standard way to traverse a whole tree without writing recursion.

Related: Glob, os module
File context manager

The with open(...) as f pattern that guarantees the file is closed even if an exception occurs inside the block. Avoids leaked file descriptors and is the expected style in reviewed code.

Related: Exception handling, Standard streams
CSV module

Standard library reader and writer for comma-separated data that handles quoting, embedded delimiters, and newlines correctly. DictReader and DictWriter map rows to dictionaries keyed by header names.

Related: File context manager, JSON module
JSON module

Standard library encoder and decoder for JSON text via json.loads, dumps, load, and dump. The usual interchange format for APIs and configuration, mapping directly onto dictionaries and lists.

Related: CSV module, YAML
Regular expression

A pattern language for matching and extracting text, used in Python through the re module. Functions such as search, findall, and sub support log parsing and validation, with raw strings recommended for patterns.

Related: Log parsing, String formatting
Logging

The standard library facility for emitting timestamped, leveled messages through configurable handlers. Preferred over print for scripts because levels, rotation, and destinations can change without editing logic.

Related: Traceback, Standard streams
Git repository

A project directory tracked by Git, containing a .git folder that stores commits, branches, and configuration. The working tree holds current files while history lives in the object database.

Related: Commit, Staging area
Staging area

The index that records which working-tree changes will go into the next commit. Files are added with git add, and git status distinguishes staged, unstaged, and untracked changes.

Related: Commit, Git repository
Commit

An immutable snapshot of the staged tree plus author, timestamp, message, and parent pointers. Each has a unique hash, forming the history graph that branches and merges traverse.

Related: Branch, Merge conflict
Branch

A movable pointer to a commit that lets work proceed independently of main. Creating a branch is cheap, and switching with git switch changes which line of history new commits extend.

Related: Commit, Pull request
Merge conflict

A state where two branches changed the same lines and Git cannot choose automatically, marking the file with conflict markers. The author resolves the text, stages the file, and completes the merge.

Related: Commit, Rebase
Rebase

Replaying commits onto a new base to produce a linear history. It rewrites commit hashes, so never rebase commits already shared on a branch others pull from.

Related: Merge conflict, Branch
Pull request

A hosted-platform request to merge one branch into another, carrying discussion, review comments, and automated checks. Reviewers approve or request changes before the merge button is enabled.

Related: Branch, Code review
Code review

The practice of having others inspect a proposed change for correctness, style, security, and test coverage before merge. Comments are addressed with new commits on the same branch.

Related: Pull request, Unit test
Unit test

An automated check that exercises one small unit of code in isolation and asserts the expected result. Fast, deterministic, and independent of network or disk, they run on every change in CI.

Related: Assertion, Test fixture
Assertion

A statement that a condition must hold, expressed with assert or a test framework's assertEqual and similar methods. In tests it defines expected behavior; in production code it may be disabled under optimization.

Related: Unit test, Exception handling
Test fixture

Setup and teardown code that prepares a known state before a test and cleans up afterward, such as a temporary directory or database row. Keeps tests repeatable and free of order dependence.

Related: Unit test, Mock
Mock

A stand-in object that records calls and returns canned values so a test can avoid real network, filesystem, or time dependencies. Provided by unittest.mock and used to assert how collaborators were called.

Related: Unit test, Test fixture
Continuous integration

A service that automatically runs tests and checks on every pushed change or pull request. Failing pipelines block merges, catching regressions before they reach the main branch.

Related: Unit test, Pull request
Cron job

A scheduled task defined in a crontab with five time fields plus the command to run. Common for backups and report generation, but output and environment variables differ from an interactive shell.

Related: Exit code, Logging
Idempotent script

A script that produces the same end state whether run once or many times, for example by checking before creating a user or directory. Essential for safe retries and scheduled automation.

Related: Cron job, Exception handling
Log parsing

Reading log files and extracting structured fields with string methods or regular expressions to count errors, find slow requests, or feed reports. Often combined with generators to handle files larger than memory.

Related: Regular expression, Generator
Process identifier

The unique integer the operating system assigns to a running process, available as os.getpid(). Used to target signals, write lock files, and correlate log lines with a specific run.

Related: Signal, os module
Signal

An asynchronous notification sent to a process, such as SIGTERM asking it to stop or SIGINT from Ctrl-C. Scripts can trap signals to clean up temporary files before exiting.

Related: Process identifier, Exception handling
Environment variable

A named string in a process's environment, read via os.environ or os.getenv, commonly used to pass secrets and configuration. Children inherit them, so avoid hardcoding values in scripts.

Related: os module, Cron job
String formatting

Building text from values with f-strings, str.format, or percent formatting. F-strings are preferred in modern code for readability and inline expressions, including format specs for alignment and decimals.

Related: Regular expression, Logging