[![The-Odds-API](https://github.com/coreyjs/the-odds-api/actions/workflows/python-app.yml/badge.svg)](https://github.com/coreyjs/the-odds-api/actions/workflows/python-app.yml)
# The Odds API (Unofficial) Client for the-odds-api.com
(This is basically a rough draft. Kinda quick and dirty for now)
You will need to acquire an API KEY from [The Odds API](https://the-odds-api.com/) to use this client.
```python
pip install the-odds
```
### Contact
Im available on [Bluesky](https://bsky.app/profile/coreyjs.dev) for any questions or just general chats about enhancements.
# Installation and Setup
```
pip install the-odds
```
```python
from the_odds import OddsApiClient
client = OddsApiClient(api_key='your_key')
# for debug logging and request logging
client = OddsApiClient(api_key='your_key', debug=True)
```
## Available Endpoints
### Get Sports
<details>
<summary>API Endpoint Info</summary>
**Endpoint:** `/v4/sports`
**Method:** GET
**Formats:** JSON
| Param | Type | Ex | Note |
|-------|------|--------------|----|
| all | bool | True / False | Optional - if this parameter is set to true (all=true), a list of both in and out of season sports will be returned |
</details>
```python
sports = client.v4.get_sports()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/coreyjs/data-golf-api",
"name": "the-odds",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "sports, odds, betting, NHL, NFL, sports-betting, odds-fetching, sports-analytics, sports-odds, odds-calculator, betting-odds, game-odds, sports-data, odds-api, hockey, football, live-odds, sports-metrics, daily-fantasy, sports-stats",
"author": "Corey Schaf",
"author_email": "cschaf@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9e/cf/f03c34d43be5519a21c5de50b2841403f32e3e4dff8eaca45189c17af649/the_odds-1.0.2.tar.gz",
"platform": null,
"description": "[![The-Odds-API](https://github.com/coreyjs/the-odds-api/actions/workflows/python-app.yml/badge.svg)](https://github.com/coreyjs/the-odds-api/actions/workflows/python-app.yml)\n\n\n# The Odds API (Unofficial) Client for the-odds-api.com\n\n(This is basically a rough draft. Kinda quick and dirty for now)\n\nYou will need to acquire an API KEY from [The Odds API](https://the-odds-api.com/) to use this client.\n\n```python\npip install the-odds\n```\n\n### Contact\nIm available on [Bluesky](https://bsky.app/profile/coreyjs.dev) for any questions or just general chats about enhancements.\n\n\n# Installation and Setup\n```\npip install the-odds\n```\n\n```python\nfrom the_odds import OddsApiClient\n\nclient = OddsApiClient(api_key='your_key')\n\n# for debug logging and request logging\nclient = OddsApiClient(api_key='your_key', debug=True)\n```\n\n## Available Endpoints\n\n### Get Sports\n\n<details>\n <summary>API Endpoint Info</summary>\n\n**Endpoint:** `/v4/sports` \n**Method:** GET \n**Formats:** JSON\n\n\n| Param | Type | Ex | Note |\n|-------|------|--------------|----|\n| all | bool | True / False | Optional - if this parameter is set to true (all=true), a list of both in and out of season sports will be returned |\n\n</details>\n\n```python\nsports = client.v4.get_sports()\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "The-Odds-APi.com Client (unofficial).",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/coreyjs/data-golf-api",
"Repository": "https://github.com/coreyjs/data-golf-api"
},
"split_keywords": [
"sports",
" odds",
" betting",
" nhl",
" nfl",
" sports-betting",
" odds-fetching",
" sports-analytics",
" sports-odds",
" odds-calculator",
" betting-odds",
" game-odds",
" sports-data",
" odds-api",
" hockey",
" football",
" live-odds",
" sports-metrics",
" daily-fantasy",
" sports-stats"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8eaf267c7f4979e47ab9bc6f9ec92abeb4e27b4973f19403814f09d5ad0e873a",
"md5": "9ab4c90082d721f1a383bec23b43f8f2",
"sha256": "61042ffe12ece65ec76bc3549b93eede8f665576520ecc5e6515704c65b5e657"
},
"downloads": -1,
"filename": "the_odds-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ab4c90082d721f1a383bec23b43f8f2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 7846,
"upload_time": "2024-10-17T03:18:30",
"upload_time_iso_8601": "2024-10-17T03:18:30.311500Z",
"url": "https://files.pythonhosted.org/packages/8e/af/267c7f4979e47ab9bc6f9ec92abeb4e27b4973f19403814f09d5ad0e873a/the_odds-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9ecff03c34d43be5519a21c5de50b2841403f32e3e4dff8eaca45189c17af649",
"md5": "8256ec8e270629550342fd69c25026f2",
"sha256": "4691b89e5c727f8bc999ceb638191a56a659909edf6e4080f371ea53cb01aad7"
},
"downloads": -1,
"filename": "the_odds-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "8256ec8e270629550342fd69c25026f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 6448,
"upload_time": "2024-10-17T03:18:31",
"upload_time_iso_8601": "2024-10-17T03:18:31.236857Z",
"url": "https://files.pythonhosted.org/packages/9e/cf/f03c34d43be5519a21c5de50b2841403f32e3e4dff8eaca45189c17af649/the_odds-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 03:18:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "coreyjs",
"github_project": "data-golf-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "the-odds"
}