This web application allows managing raffles at events, providing a system to:
- Load a participant list from a CSV file
- Create multiple raffle rounds
- Define different prizes per round
- Perform random draws ensuring unique winners throughout the event
- Export results
- Intuitive user interface built with Streamlit
- Support for CSV files with different column formats
- Filter participants by check-in status
- Configuration of multiple rounds with variable number of winners
- Prize management system
- Guarantee that no participant wins more than one prize
- Results export
- Python 3.7 or higher
- Dependencies listed in
requirements.txt
-
Virtual environment setup (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies
pip install -r requirements.txt
-
Run the app
streamlit run app.py
-
Open your browser and go to
http://localhost:8501
-
Build the Docker image
docker build -t sorteo-app . -
Run the Docker container
docker run -p 8501:8501 sorteo-app
-
Open your browser and go to
http://localhost:8501
-
Start the application using Docker Compose
docker-compose up
-
Open your browser and go to
http://localhost:8501
Options for using the application:
- Web Interface: Use the web interface for a user-friendly experience.
- Command Line Interface (CLI): Use the command line for quick operations or automation.
NOTE:
-for--file: Path to the CSV file with participant data-wor--winners: Number of winners to draw-cor--checked-in: Use only checked-in participants-por--prize: Prize name for the round-ror--round: Round name for the draw-hor--help: Show help message and exit
Steps:
-
Download the participant list:
-
Run the script:
- Make sure you have Python 3.7 or higher installed
- Install the required dependencies using
pip install -r requirements.txt - Make sure the script is executable by running
chmod +x sorteo.py - Run the script with the command
python sorteo.py -f <event-participant-list>.csv -w <number-of-winners>
-
Download the participant list:
-
Upload participant list:
- Upload a CSV file with participant data
- Optionally filter by checked-in participants
-
Round configuration:
- Add one or more raffle rounds
- Configure name and number of winners for each round
- Add prizes to be raffled in each round
-
Conduct raffles:
- Use the "Draw winners" button in each round
- View winners immediately
- Export results when finished
The CSV file must contain at least the following columns:
Checkin Date (UTC)orchecked_in_at: Check-in dateEmailoremail: Participant's emailFirst Nameorfirst_name: Participant's first nameLast Nameorlast_name: Participant's last name
This project is licensed under the MIT License.