A Python wrapper around The Odds-Api V4
Project description
the-odds-api-client
Python wrapper for The Odds API V4
Getting Started
Run
pip install -r requirements.txt
Example Usage
Instantiate an instance of theOddsAPI
by passing in an API key, which you
should receive via email upon signing up for a subscription plan here.
client = theOddsAPI('YOUR_KEY_HERE')
Let's say you want to find out what the spread odds were on Fanduel's sportbook for games played on the 1st of January in the year 2023 around 12:00 UTC. Then, you would run the following:
self._test_get_historical_odds(
sport='basketball_nba',
regions='us',
markets='spreads',
date='2023-01-01T12:00:00Z',
bookmakers='fanduel',
oddsFormat='american')
Documentation
You can find the documentation for the Odds API Client hosted here.
Testing
A test of this package can be done by running the following command
python tests/test.py
Note: As a wrapper for The Odds API which requires the use of an API key,
testing this package requires using part of your the request quota associated
with the API key supplied. The usage quota for running the various tests suites
in tests.py
can be found in the schedule below.
Test Suite | Usage Quota |
---|---|
odds_suite | 3 |
event_odds_suite | 2 |
historical_odds_suite | 30 |
usage_suite | 0 |
scores_suite | 5 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for theoddsapi-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d445875513ea255fb1a1f37e0534d50eebce10aa5975067d58a0d0db17a1cda |
|
MD5 | 30c3a4f60f6fcc855e1e481009b31031 |
|
BLAKE2b-256 | 0e3bd5c5a1ec59977e927df9c5ca6492f4a4cbb39059a1c0aa777a5db721eec5 |