treys is a pure Python poker hand evaluation library. It provides fast evaluation of 5-, 6-, and 7-card poker hands, as well as deck and card utilities. Current version 0.1.8 is stable with low release cadence.
pip install treysVerified import paths — ran on the pinned version, not inferred.
Basic usage: create a deck, draw a community board and a hand, then evaluate the hand rank.
Use Card.new or Card.from_str to create cards from string, not the Card constructor directly.
Use 'from treys import Card, Deck, Evaluator' instead of deep imports.
No action needed; just be aware of the two-step process to get a rank string.
Use 'from treys import Card' instead of 'import treys'.
Use 'Th' for ten of hearts. For full card string, e.g., 'Ah' for Ace of hearts.
No dependency data recorded yet.