runtime
All projects

GitHub Event Streaming Analyzer

Read a stream of events, skip ones already counted, and report the totals.

The project

Four events were saved as lines of JSON. e1 appears twice. You'll read every line, count views even when an id repeats, remember the last id, then count each id only once and write that.

The steps

Your files

  • stream.py you write this
  • main.py you write this
  • data/events.jsonl 4 records
GitHub Event Streaming Analyzer — Python project · Runtime