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
Installation
pip install topaz_api
Usage
from topaz import TopazAPI
api_key = 'YOUR_API_KEY_HERE'
topaz_api = TopazAPI(api_key)
Suggested work flow
import pandas as pd
authority_codes = [ 'NSW', 'NT', 'QLD', 'SA', 'TAS', 'VIC', 'WA']
all_races = []
for code in authority_codes:
try:
races = topaz_api.get_races(from_date='2023-12-01', to_date='2023-12-06', owning_authority_code=code)
all_races.append(races)
except Exception as e:
print(f"Error fetching races for {code}: {e}")
# Concatenate all fetched races into a single DataFrame
all_races_df = pd.concat(all_races, ignore_index=True)
# Extract unique race IDs
race_ids = list(all_races_df['raceId'].unique())
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
topaz_api-0.0.7.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topaz_api-0.0.7.tar.gz.
File metadata
- Download URL: topaz_api-0.0.7.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342932b7e0980945844998737c99ac8b380ad2f056e82dfb0f6d6866a0baa835
|
|
| MD5 |
89d36216a676625e6eac1272c22fdf0b
|
|
| BLAKE2b-256 |
8b7c1cd895ca427ff240258cbdb9a77c2d9ef58d27ee12ac9e25769d1fcbd07a
|
File details
Details for the file topaz_api-0.0.7-py3-none-any.whl.
File metadata
- Download URL: topaz_api-0.0.7-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeab482de4e22d7d108e697136cca9b84881a429e5a4c91a39926a8b0be72500
|
|
| MD5 |
414dd0418d60f4321bc5af0a56d5e980
|
|
| BLAKE2b-256 |
158f9522480024b0b1ec16f3197da5b331a7626f823d3df957edfed50ae51472
|