Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Last drill — the JSON pattern AI uses on every config file.
- Import
json. - Write a dict
{"app": "promptdojo", "users": 1}to/tmp/config.jsonusingjson.dump(data, f)inside awithblock. - Read it back with
json.load(f). - Print the value of the
"app"key.
Expected output:
promptdojo