Python Quest

Track 7 · Lesson 11 of 11

Mini project: web log analyzer

Build a small analyzer for a web-server access log in five milestones: parse lines with a regex, count status codes, rank pages, chart traffic by hour and print a formatted report.

About 75 minAdvanced5 exercises

You will be able to

  • Design a parser for a real log format with named regex groups and reject damaged lines
  • Aggregate parsed records into counts with dictionaries, normalising values such as query strings
  • Sort and rank results with a clear tie-breaking rule
  • Present results as a text chart and an aligned report using format specifications

Included with a Formula Quest membership

It has 5 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.

View Formula Quest memberships

Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.