Skip to main content

This is a simple package which offers data types for odds and functions to convert between odds data type

Project description

Odds Conversion Package

This is a simple package which offers data types for odds and functions to convert between odds data type.

Importing

You can import the odds conversion package by:

from odds_conversion import odds_conversion
from odds_conversion import american_odds
from odds_conversion import fractional_odds
from odds_conversion import decimal_odds

Using Odds Conversion

You can use the Odds Conversion command using:

a = american_odds.AmericanOdds(float(200))
f = fractional_odds.FractionalOdds(float(2))
d = decimal_odds.DecimalOdds(float(3))

ai = convert_american_odds_to_implied_odds(a)
fi = convert_fractional_odds_to_implied_odds(f)
di = convert_decimal_odds_to_implied_odds(d)

print(ai, convert_implied_odds_to_american_odds(ai))
print(fi, convert_implied_odds_to_fractional_odds(fi))
print(di, convert_implied_odds_to_decimal_odds(di))

which will output

0.3333333333333333 AmericanOdds(odd=200.00000000000003)
0.3333333333333333 FractionalOdds(odd=2.0000000000000004)
0.3333333333333333 DecimalOdds(odd=3.0)

Using Pot Odds

You can use the following commands to calculate pot odds using:

pot = float(10000)
call = float(3000)

odds = .5

print(implied_odds_to_call(pot, call))
print(bet_for_implied_odds(pot, odds))

which will output

0.23076923076923078
10000.0

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

odds_conversion_tb-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

odds_conversion_tb-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file odds_conversion_tb-0.0.1.tar.gz.

File metadata

  • Download URL: odds_conversion_tb-0.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for odds_conversion_tb-0.0.1.tar.gz
Algorithm Hash digest
SHA256 775cc525a8e7c88e4a3f8bb4b530762e185452f0ac2921c996b3ba34462cf14e
MD5 5aca4c13d4250505d67c7eba35e2a470
BLAKE2b-256 cd7ba9724b01f212033a87d4bc93bab44bf7f8e21bc3316a7d34a245dfa9cee7

See more details on using hashes here.

File details

Details for the file odds_conversion_tb-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for odds_conversion_tb-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e57d94d000533230420d24f2c2fbaba1c0b91296f353e35323e588ab6c15e576
MD5 c037ad895bea76b259da20f39a1995dd
BLAKE2b-256 65e39d2e713676fa3a25c107bc7f32e31da7347eb552372bb6501423a07c9064

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