Skip to main content

A Python wrapper for the GRV Topaz API

Project description

Topaz API

A simple Python Wrapper for the GRV Topaz API. Quickly written with the help of ChatGPT.

Requires a Topaz API key obtainable through the Betfair Automation team @ api@betfair.com.au

Docs

Installation

pip install topaz_api

Usage

from topaz import TopazAPI

api_key = 'YOUR_API_KEY_HERE'
topaz_api = TopazAPI(api_key)

Suggested work flow

# Might take 4 or 5 mins to run
races = topaz_api.get_races(from_date='2023-12-01', to_date='2023-12-06')
race_ids = list(races['raceId'].unique())

race_runs = []
for race_id in race_ids:
    race_run = topaz_api.get_race_runs(race_id=race_id)
    race_runs.append(race_run)

race_runs = pd.concat(race_runs)
print(race_runs)

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

Topaz_api-0.0.5.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

Topaz_api-0.0.5-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

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