Browse Python Institute Certification Guides

PCAA Cheat Sheet

Early PCAA cheat sheet for Python automation reliability, APIs, idempotency, retries, logs, configuration, and secrets.

Use this cheat sheet as early preparation for PCAA-31-0x: Certified Associate Automation Specialist with Python. Python Institute lists PCAA as work in progress, so focus on stable automation reasoning rather than final exam weights.

Reliable automation loop

    flowchart TD
	  I["Read inputs and configuration"] --> V["Validate scope and preconditions"]
	  V --> P["Process one bounded batch"]
	  P --> C["Checkpoint successful work"]
	  C --> L["Log summary and failures"]
	  L --> R["Retry only safe failures"]
	  R --> E["Exit with useful status"]

Strong automation is not just a script that works once. It can be rerun, observed, stopped safely, and debugged after failure.

Automation decisions

Area Strong answer Weak answer
Inputs Validate files, arguments, environment, and API parameters before work starts. Let bad input fail halfway through the job.
API calls Handle status codes, pagination, timeouts, retries, rate limits, and schema changes. Assume one request returns all valid data.
Idempotency Use keys, checkpoints, conditional writes, and duplicate detection. Create duplicates every time the job retries.
Scheduling Make jobs safe when delayed, overlapping, or rerun manually. Assume the scheduler always runs once at the perfect time.
Logging Log structured events, counts, failures, and correlation values without secrets. Print vague messages that cannot explain what happened.
Configuration Keep environment-specific values outside source code. Edit code to change production behavior.
Secrets Read secrets from approved storage and keep them out of output. Commit tokens or print them during debugging.

API automation traps

Trap Safer habit
Pagination ignored Loop until the API indicates there is no next page.
Retry unsafe operation Retry only when the action is idempotent or protected by a unique key.
Timeout missing Set timeouts so the job does not hang indefinitely.
Rate limit ignored Back off and retry according to the service behavior.
Auth failure hidden Stop, log a safe error, and avoid partial writes.
Schema drift Validate required fields and handle missing or extra fields explicitly.

Safety checklist

Before the job runs Confirm
Scope Which records, files, users, systems, or dates are affected.
Dry run Whether the job can preview changes before writing.
Backup Whether destructive or bulk changes can be recovered.
Permission Whether the account has only the access it needs.
Checkpoint Whether successful work is recorded before the next batch.
Failure path Whether partial failure leaves a clear recovery plan.

Code habit to recognize

1for item in batch:
2    if already_processed(item["id"]):
3        continue
4    process(item)
5    mark_processed(item["id"])

The important idea is not the specific function names. The pattern prevents a rerun from repeating work that already completed.

Revised on Monday, June 15, 2026