We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Config, Logs and Untrusted Input
PythonCheck outside data once, where it enters your program, and turn config files, environment variables and request bodies into typed values. Decode bytes on purpose, run commands without a shell, keep user input out of SQL, and log from a library so each application controls what it sees.
This track uses Python. You can make it your practice mode to browse related content across the site.
Your learning sequence
- 1 Check Outside Data Where It Enters Your Program Read
- 2 Not solved yet. Turn Outside Data into a Typed Record Practice · Easy
- 3 Not solved yet. Parse a Nested Config with Placeholders and Secrets Practice · Medium
- 4 Not solved yet. Read Settings from Environment Variables Practice · Medium
- 5 Not solved yet. Merge Settings from a File, the Environment and the Command Line Practice · Medium
- 6 Bytes, Text and Line Endings Read
- 7 Load Outside Data Without Running Its Code Read
- 8 Not solved yet. Run a Command Without a Shell Practice · Easy
- 9 Not solved yet. Keep User Input Out of Commands and SQL Practice · Hard
- 10 Use Ruff's Security Rules Without the Noise Read
- 11 Not solved yet. Log from a Library the Right Way Practice · Easy
- 12 Not solved yet. Trace a Log Record Up the Logger Tree Practice · Medium
- 13 Not solved yet. Turn Log Fields into JSON-Safe Data Practice · Hard
- 14 Diagnose a Slow, Stuck or Crashing Python Service Read
- 15 Change a Library's API Without Breaking Its Users Read
- 16 Test the Wheel You Ship, Not Your Checkout Read
Check yourself
5 questions · not saved while you're signed outUse these questions to check your understanding and compare explanations. Your score does not affect track completion.
Nothing in this script sets up logging. What does it print?
Choose one answer to reveal the explanations. Answers are kept only while this page is open.
import logging
logger = logging.getLogger("shop.inventory")
logger.info("reserved 3 apples")
logger.warning("apples are low")