Skip to main content

Poker Bot

Overview

Poker Bot is a Python package designed for calculating poker hand equities and managing a poker game. This package includes functionalities for deck management, hand evaluation, equity calculation, and game management.

Features

  • Deck Management: Initialize, shuffle, draw, and reset a deck of cards.
  • Hand Evaluation: Evaluate poker hands to determine their ranks.
  • Equity Calculation: Calculate the probability of winning, losing, and tying for two-player No-Limit Hold'em.
  • Game Management: Manage player buy-ins, rebuys, and cashouts in a poker game.

Installation

To install the package, use: ```sh pip install pokerFunctions ```

Usage

Deck Management

```python from pokerFunctions.equity import Deck

Initialize a new deck

deck = Deck()

Shuffle the deck

deck.shuffle()

Draw cards

cards = deck.draw(5) print(cards)

Reset the deck

deck.reset() ```

Hand Evaluation

```python from pokerFunctions.equity import evaluate

hand = ['6s', '7s', '8s', '9s', 'ts'] # Straight flush rank = evaluate(hand, Deck()) print(rank) # Output: [9, 10] ```

Equity Calculation

```python from pokerFunctions.equity import equity

hero = ['as', 'ks'] villain = ['qd', 'qh'] board = ['2s', '3s', '4s'] result = equity(hero, villain, board, runs=1000) print(result) # Output: [win_percentage_hero, win_percentage_villain, tie_percentage] ```

Game Management

```python from pokerFunctions.gamebank import Game

Initialize a new game

game = Game('host_name')

Add players

game.add_player('player1', 100) game.add_player('player2', 150)

Player rebuys

game.rebuy('player1', 50)

Remove a player (cash out)

game.remove_player('player2', 100)

Get game status

print(game.gamestatus()) ```

Development

To contribute to the development of Poker Bot, clone the repository and run the following commands to install the dependencies and run tests: ```sh git clone https://github.com/yourusername/pokerFunctions.git cd pokerFunctions pip install -r requirements.txt python -m unittest discover ```

License

This project is licensed under the MIT License.

Contact

For more information or support, contact Jonah Aden.


Note: This is a basic README template. Customize it according to your project's specifics and requirements.

Metadata

Release files for pokerFunctions 0.6

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

Source distribution (sdist)

Source distribution for pokerFunctions 0.6
File Size Uploaded Provenance
pokerfunctions-0.6.tar.gz 8.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 16.0 kB

Release files / pokerfunctions-0.6.tar.gz

Download URL pokerfunctions-0.6.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d3b1dbf3be637fdfb35ca2de2900543bb00c50b05ca70f846f497ae4edc8320e
BLAKE2b-256 checksum
How to use checksums
8cc9926e0f58b7485c63fb7f702a9eb2a122aaa5e0b82fc92cc36490234d3ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / pokerFunctions-0.6-py3-none-any.whl

Download URL pokerFunctions-0.6-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5226480edd70a4da7f67d5bfa6a688538d1316ab1784915be6ea88aebbe41776
BLAKE2b-256 checksum
How to use checksums
ac746d7f0db365c2fe81882b46cec03912aab0950dd7b1474ca536f0108f675c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Security for pokerFunctions 0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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