Structurally, this already IS an Okta/Slack/Google user-export script — minus swapping the mock functions for real requests calls. Ten labs pulling together everything from Tiers 1-9.
Set os.environ["MY_API_TOKEN"] = "supersecret123" yourself, read it with get_required_env(), build the auth header with build_auth_header(). Print the header.
{'Authorization': 'Bearer supersecret123'}Write fetch_page(page_number, page_size=5, users=USERS), same mock as Module 12. Call fetch_page(1). Print len(result["items"]) and result["has_more"].
5 then TrueWrite call_with_limit(state, max_calls), same mock as Module 12. state = {"calls": 0}, call it twice with max_calls=5. Print state["calls"].
2Write fetch_all_within_budget(max_calls) combining Labs 2-3 — paginate through everything, respecting the call budget. Call it with max_calls=10. Print len(result["items"]) and result["complete"].
12 then TrueWrite flatten_memberships(users), same mechanic as Tier 9. Flatten fetch_all_within_budget(10)'s items. Print len() of the result.
15Sort the flattened rows by lastName. Print the first row's last name.
ChenWrite the sorted, flattened rows to "p7_report.txt", numbered with enumerate(..., start=1), same format as Tier 9.
Read "p7_report.txt" back. Print how many lines it has.
15Combine the auth token from Lab 1, the fetch from Lab 4, and the flatten from Lab 5. Print "N rows, M groups, token starts with XXXX" — never print a full token in real code, only the first 4 characters.
15 rows, 6 groups, token starts with supeCombine every mechanic from Labs 1-9 into one script: auth header → paginated/rate-limited fetch → flatten → sort → write a numbered report → print the summary line → read the report back to confirm its line count. This is the single most complete script in Module 13.
15 rows, 6 groups, token starts with supe then 15Open problems/tier10_full_mock_client.py and do all 10 problems locally. Uses fixture.py -- type it in first from DAY1_01_FIXTURE.md if it's not already in this folder. Run python check.py in problems/ to grade everything.
Structurally, Tier 10's script already IS an Okta/Slack/Google user-export tool. Module 14 swaps the mocks for real calls. ← Back to Module 13