This is a standalone web application built with Flask that helps train poker pre-flop ranges. The app randomly generates two poker cards, and the user must guess the correct bucket (classification) of the hand based on pre-defined classifications.
- Random Poker Hand Generation: Generates two poker cards, which the user has to classify.
- Bucket Classification: The user enters a bucket for the generated hand, and the app checks if it's correct.
- Web Interface: A simple and intuitive web interface, automatically opened in the browser.
- Standalone Application: The app is bundled as a single executable using PyInstaller, so no external Python installation is required.
- From the releases, download the binary suitable for your operating system. (Only available for linux at the moment)
- Run the downloaded executable file: PreFlopTrainer.
- The app will automatically open in your browser. If it doesn’t, open your browser and navigate to http://127.0.0.1:5000.
- Click "Generate Hand" to start, and enter the bucket you think the hand belongs to.
- Python 3.x
- Flask
- Pillow
- Pandas
- Numpy
- PyInstaller (if you want to package the app into a standalone executable)
-
Clone the repository:
git clone https://github.com/yourusername/poker-preflop-trainer.git cd poker-preflop-trainer
-
Set up a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Run the Flask app:
python PreFlopTrainer.py
-
The app will automatically open in your web browser. If it doesn't, manually open your browser and navigate to
http://127.0.0.1:5000
. -
Click Generate Hand to generate two poker cards. Guess the bucket and submit your answer.
To create a standalone executable:
-
Install PyInstaller:
pip install pyinstaller
-
Run the following command to bundle the app into a single executable:
pyinstaller --onefile --add-data "data:data" --add-data "templates:templates" PreFlopTrainer.py
-
The executable will be created in the
dist/
directory. You can now run the app without requiring a Python installation:./dist/PreFlopTrainer
This project is licensed under the MIT License. See the LICENSE file for details.
- Flask - A lightweight WSGI web application framework.
- PyInstaller - A tool to bundle Python applications into standalone executables.
- 5-Card_Poker_Hand_Simulator_and_Visualizer The cards images and code to generate 2-cards visualization was inspired by the following project : https://github.com/SJMagaziner/5-Card_Poker_Hand_Simulator_and_Visualizer