Skip to main content
  • For: section leaders
  • You get: a register for each section for a term, as CSV files, with each young person’s attendance
  • Time: about ten minutes
  • Scopes: events:read
This recipe builds a term’s registers from Scoutworks. It saves one CSV file for each section. Open them in Excel, Numbers or Google Sheets. Use them to spot a young person who has stopped coming, or to check who met the attendance rule for an award. It uses Python 3.9 or later and the requests package (pip install requests).
attendance.py
Run it:
Each file has P for present, A for absent and a blank for a meeting where the young person was not on the register. The last column is their attendance for the meetings where a register was taken.

Choose the term

Change TERM_START and TERM_END at the top. TERM_END is the first moment after the term, so 2026-12-20T00:00:00Z includes every meeting up to the end of 19 December.

Switch to your group

Change api-demo.scoutworks.app to api.scoutworks.app, and set your key in the environment. read -s asks for the key without showing it, so it stays out of your shell history:
Your key needs the attendance:read scope only.

Notes

  • How many requests. One request for each 200 registers: a term is one or two. If the limit of 120 a minute is ever reached, the script waits and goes on. See Rate limits.
  • Sections. Each young person is filed under their own main section, so a meeting for two sections, or for the whole group, adds a column to each section’s file.
  • Trips and camps. The script counts meetings only. To count every event, remove the if r["event"]["type"] == "programme_meeting" line.
  • The utf-8-sig encoding makes Excel show accented names correctly.
  • Keep a sheet up to date. Save the time you ran it, and next time add updatedSince to read only the registers marked since. See Pagination.