Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coreyjs/the-odds-api
The-Odds-API.com Client
https://github.com/coreyjs/the-odds-api
Last synced: 1 day ago
JSON representation
The-Odds-API.com Client
- Host: GitHub
- URL: https://github.com/coreyjs/the-odds-api
- Owner: coreyjs
- License: mit
- Created: 2024-10-17T02:22:41.000Z (21 days ago)
- Default Branch: main
- Last Pushed: 2024-10-17T03:17:21.000Z (21 days ago)
- Last Synced: 2024-10-19T05:29:26.090Z (19 days ago)
- Language: Python
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![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 OddsApiClientclient = OddsApiClient(api_key='your_key')
# for debug logging and request logging
client = OddsApiClient(api_key='your_key', debug=True)
```## Available Endpoints
### Get Sports
API Endpoint Info
**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 |```python
sports = client.v4.get_sports()
```