Skip to main content

Texas Hold'em Poker tool

Install

pip install THPoker

Requirements

  • python>=3.8

Usage

Core

>>> from thpoker.core import Cards, Combo, Hand, Table

>>> combo1 = Combo(hand=Hand("Kh/Ah"), table=Table("8h/9h/Th/Jh/Qh"))
>>> print(combo1)
straight flush (A♥, K♥, Q♥, J♥, T♥)
>>> combo2 = Combo(cards=Cards("Td/As/3h/Th/Ah/Ts/9c"))
>>> print(combo2)
full house (T♦, T♥, T♠, A♠, A♥)
>>> combo1 > combo2
True

Hardcore

>>> from thpoker.hardcore import hcombo

>>> combo1 = hcombo("Kh/Ah/8h/9h/Th/Jh/Qh")
>>> print(combo1)
[9, 14]
>>> combo2 = hcombo("Td/As/3h/Th/Ah/Ts/9c")
>>> print(combo2)
[7, 10, 14]
>>> combo1 > combo2
True

Documentation

Explore

Metadata

Release files for THPoker 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for THPoker 2.2.1
File Size Uploaded
THPoker-2.2.1.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for THPoker 2.2.1
File Interpreter ABI Platform
THPoker-2.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / THPoker-2.2.1.tar.gz

Download URL THPoker-2.2.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b1e1fbde7d1fbd46b1dde02eeb54de92259a386194f7419d76d5ae794223e881
BLAKE2b-256 checksum
How to use checksums
dbb206402e069b96f4fcc6577efea113f7477c15f8f726e1eb97d954984c705c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / THPoker-2.2.1-py3-none-any.whl

Download URL THPoker-2.2.1-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af74a87d0b69cca0d25824617e7a6f6b3ea644e78353052b75fcbb852112e3c0
BLAKE2b-256 checksum
How to use checksums
0274d1c099025f86b576ce8d009a20ead60160791514015c3edae37c0d64b40b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release history Release notifications | RSS feed

This release

2.2.1 This release

2 release files

2.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page