Skip to main content

Utility library for converting between betting odds

Project description

Betting

Utility library to convert between betting odds.

Converts to/from:

  • American/Moneyline odds
  • Decimal odds
  • Fractional odds
  • Implied probability

Installation

pip install betting

Functions

  • american_odds_to_decimal_odds(american_odds: float) -> float
  • american_odds_to_fractional_odds(american_odds: float) -> Tuple[float, float]
  • american_odds_to_probability(american_odds: float) -> float
  • decimal_odds_to_american_odds(decimal_odds: float) -> float
  • decimal_odds_to_fractional_odds(decimal_odds: float) -> Tuple[float, float]
  • decimal_odds_to_probability(decimal_odds: float) -> float
  • fractional_odds_to_american_odds(numerator: float, denominator: float) -> float
  • fractional_odds_to_decimal_odds(numerator: float, denominator: float) -> float
  • fractional_odds_to_probability(numerator: float, denominator: float) -> float
  • probability_to_american_odds(p: float) -> float
  • probability_to_decimal_odds(p: float) -> float
  • probability_to_fractional_odds(p: float) -> Tuple[float, float]

Usage

from betting import convert

print(f"The implied probability for decimal odds of 3 is {decimal_odds_to_probability(3.)}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

betting-0.0.4.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

betting-0.0.4-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file betting-0.0.4.tar.gz.

File metadata

  • Download URL: betting-0.0.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for betting-0.0.4.tar.gz
Algorithm Hash digest
SHA256 36a0f90f6070556d1e8c2af0dc03f185e20e6862d21e46682c24b807fec74af9
MD5 e2f46168efc9a88dabdac35d9229d78e
BLAKE2b-256 0ce286dc3d59d1fa6ca4e888cec5e2fdc2ce80719c1b37967cd0e9b464127bd9

See more details on using hashes here.

File details

Details for the file betting-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: betting-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for betting-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 480d3ccc888fb37460cd5efd1db461f4abe91c4e35d63b6a57ed1149f93bb73c
MD5 088d87aad0816747544124f9774f9ed9
BLAKE2b-256 a956f112475f7616491d947def73d5ae910d885756a820713b40ff975ab95aa6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page