Skip to content

An open source poker hand tracker built in Python & Django.

Notifications You must be signed in to change notification settings

JakeMcG/pypoker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPoker

An open source poker hand tracker built in Python.

PyPoker runs as a Django web app allowing you to analyze a history of Texas Hold 'Em poker hands.

PyPoker's database and analytics are designed to support generic Hold 'Em hands, regardless of the site they are played on. Today, hand histories can only be imported directly from one site: blockchain.poker. One day, this project may support more sites.

Disclaimers

  • I am in no way affiliated with the blockchain.poker or any other online poker site
  • I am not a web developer by trade, and I am especially not a front-end developer. PyPoker's front-end UI/UX/toolchain is far from optimal. If you want to make it better, see here

Contents

User Guide

To have a hand history to analyze, go to blockchain.poker and play. Create a username and password for your account. These credentials will be necessary to import your hand history.

The complete setup steps are covered in the Developer Guide. To open PyPoker, run python manage.py runserver and open a web browser to http://127.0.0.1:8000/

Importing Hands

Click Import More Hands and enter your site credentials. Recent hands that are available will be imported.

Screen-recorded gif

Analytics

Pre-Flop

The pre-flop statistics tab lets you analyze your VPIP (voluntarily puts money in pot) percentage across different positions, stack sizes and numbers of preceeding bets.

Screen-recorded gif

A player voluntarily puts money in pot whenever they make a pre-flop bet besides posting a blind. When any player except the big blind calls or raises pre-flop, they have voluntarily put money in. The big blind voluntarily puts money in if they raise, or if they call a bet larger than the big blind.

Outcomes

The outcomes tab lets you analyze the average outcome (winningness and profitability) of different actions taken on different streets. For example, the profitability of 3-betting pre-flop. Outcomes can be AND'd together by checking more than one box, for example, to analyze the profitability of 3-betting pre-flop and then continuation betting after the flop.

Screen-recorded gif

Developer Guide

Prerequisites:

  • Python + Anaconda
  • Node

I have used Anaconda to manage virtual environments and dependencies, and ships with an environment.yml file. The setup steps that follow will detail this route, but using another package manager should be trivial.

Initial Setup

Create and activate an Anaconda virtual environment:

conda env create -f environment.yml

conda activate pypoker

Install Javascript front-end dependencies (references package.json):

npm install

Collect and copy dependencies from node_modules to Django's static directory:

python collect_from_npm.py

Set up Django's database:

cd pypoker

python manage.py migrate

Run tests:

python manage.py test

You are ready to launch the app:

python manage.py runserver

Want to Contribute?

About

An open source poker hand tracker built in Python & Django.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published