Skip to main content
Taking a register by hand at the start of a busy evening is easy to skip. This recipe turns it into a scan at the door: each young person has a card with a QR code, a laptop or tablet by the door scans it, and Scoutworks marks them present on tonight’s register. It has two parts. Print the cards once a term. Run the kiosk each evening. Both use Python 3.9 or later. Printing also uses the qrcode package: pip install requests qrcode. The scanner can be any barcode scanner that types what it reads, the way a keyboard does. Most USB and Bluetooth scanners work like this, and so do “scan to keyboard” apps on a phone or tablet.

1. Print the cards

This script writes cards.html: one card for each young person in a section, with their name and a QR code. Open it in a browser and print it on card.
cards.py
Run it with the sandbox key to see what the cards look like:
The QR code holds the young person’s Scoutworks id and nothing else, so a lost card tells nobody who it belongs to. Print new cards when someone joins.

2. Run the kiosk

This script asks which of today’s meetings to take the register for, then waits for scans. It sends them to Scoutworks in batches: when 20 are waiting, or with the next scan once 15 seconds have passed. Press Enter on its own to send what is waiting. A slow connection never holds up the queue at the door. A scan that cannot be sent waits in checkin-queue.json and goes with the next batch, even if the script is stopped and started again.
kiosk.py

3. Use your own key

The sandbox key is read-only, so the kiosk needs your own key. A group admin creates one in Settings → Integrations → API keys, with these scopes:
  • members:read, to print the cards;
  • events:read, to find tonight’s meeting;
  • attendance:read and attendance:write, to mark the register.
Change api-demo.scoutworks.app to api.scoutworks.app in cards.py, and set your key in the environment. read -s asks for it without showing it:
Try it with one card first. Scan one young person, press Ctrl+C, and check tonight’s register in Scoutworks. They should be marked present. If the mark is wrong, change it in Scoutworks, which is also where you take a mark off.

Notes

  • Only present. The kiosk marks who came. Mark anyone who did not come as absent in Scoutworks, or send "attendance": "absent" for them.
  • Scanning twice is fine. The same scan again answers unchanged. A batch counts as one write against the limit of 30 a minute, so a queue of arrivals never reaches it. See Writing data.
  • Families are not told. A mark never emails or notifies a parent, and never changes their reply to the event.
  • Joint events. A young person from another group is refused: each group marks its own. A meeting that is full refuses a walk-in, because the kiosk cannot ask a leader to confirm. Mark that young person in Scoutworks, which can go over the limit.
  • A webhook. If your group has a webhook for attendance.recorded, each batch sends one event for the register, not one for each young person.