Because choosing a winner should be as fun as building with LEGOs!
A delightfully silly command-line tool for conducting prize draws at conferences, meetups, or anywhere you need to pick winners in the most dramatic way possible. Built with Python, Rich console formatting, and an unhealthy amount of enthusiasm for LEGO sets!
- 🎭 Dramatic Winner Selection: Complete with spinning monkey animation and suspenseful catchphrases
- 📊 Smart CSV Parsing: Handles various CSV formats and column naming conventions
- 🎨 Beautiful ASCII Art: Winners get their names displayed in glorious ASCII art
- 🔄 Absent Winner Handling: Automatically picks a new winner if the selected person isn't present
- 🎪 Conference-Ready: Perfect for tech conferences, meetups, and office parties
Click the image above to see the tool in action!
pip install typer rich artpython lego_prize_draw.py pick-a-winnerOr with a custom entries file:
python lego_prize_draw.py pick-a-winner --entries-file my-participants.csvpython lego_prize_draw.py --helpThe star of the show! This function:
- Reads participant data from a CSV file
- Asks if you want to check the entries (spoiler: you do!)
- Dramatically selects a random winner with animated suspense
- Displays the winner's name in beautiful ASCII art
- Handles the awkward "winner isn't here" situation by picking someone else
- Keeps going until someone actually claims their prize!
What makes it special:
- Animated spinner with a monkey emoji (because why not?)
- Suspenseful catchphrases that build anticipation
- Zero-indexed random selection (no off-by-one errors here!)
- Graceful error handling for missing files or invalid data
For more sensitive events where anonymity is key (or for when you can't get your hands on a CSV file), this function:
- All the same drama and flair as the name-based draw but only displaying the winning number
- You'll need to manually lookup the name associated with the winning number
Supported CSV formats:
- Separate columns:
First Name, Last Name - Alternative naming:
firstname, lastname,given, surname,prenom, nom de famille - Single column:
Full Name, Name, Participant, Attendee - Mixed case and spacing variations
Smart features:
- Automatically detects column naming conventions
- Falls back to full name splitting if separate columns aren't available
- Provides helpful feedback about which columns it's using
- Validates data and reports any issues
Sometimes you need to pick winners for conference swag, and sometimes that swag happens to be LEGO sets. When that happens, you don't just want a boring random number generator or the overused Number Picker Wheel - you want drama, you want suspense, you want a monkey spinner!
This tool was born from the realization that if you're giving away something as awesome as LEGO sets, the selection process should be equally awesome.
- Python 3.7+ (because type hints are lovely)
- Typer for the CLI magic
- Rich for beautiful console output
- Art for ASCII text generation
- CSV handling that's more flexible than a LEGO joint
- Test your CSV file first - run the tool with
--helpto make sure everything works - Have a backup plan - keep a physical list just in case technology decides to be dramatic
- Practice your dramatic flair - the tool provides the suspense, but you provide the showmanship!
- Bring extra LEGO sets - trust me on this one
This project is licensed under the "Do Whatever You Want With It But Please Give Me Credit If You Use It At A Conference" license.
Also known as MIT. 🎉
May the odds be ever in your favor! 🧱✨