Skip to main content

the-odds-api-client

Python wrapper for The Odds API V4

Getting Started

You can install the package using

pip install theoddsapi

Or you can run the following

git clone git@github.com:MidpriceDog/the-odds-api-client.git

and then

make install

Either way, it is assumed you have Python 3, git, and pip installed.

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

Please refer to the documentationhere for information on how to use this package.

Testing

Run

make test

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 quotas for running the tests suites in the test.py file under the tests directory 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

Release files for theoddsapi 1.3.7

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

Source distribution (sdist)

Source distribution for theoddsapi 1.3.7
File Size Uploaded
theoddsapi-1.3.7.tar.gz 13.2 kB Details

Built distribution (wheel)

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

Total release size: 20.6 kB

Release files / theoddsapi-1.3.7.tar.gz

Download URL theoddsapi-1.3.7.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b79e1fc37e5549971d1f858d7d137818bd20cc8f585708c82cabc33ec618eb89
BLAKE2b-256 checksum
How to use checksums
6cc85f5e4d3e810eef326c9a6eacd4bac2cb34a53e9737fc9d2ec71e07755a20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / theoddsapi-1.3.7-py3-none-any.whl

Download URL theoddsapi-1.3.7-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfd48408056b40e0cefc0de7815b7b123a45b822c23affb4b658446fc752d600
BLAKE2b-256 checksum
How to use checksums
11b3c35b98f373c3373eb68c6ae2337d826ea9d66c72f4cb0a94ff6ceb8ed5f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.3.7 This release

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.0

2 release files

1.1.0

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