Skip to content

Python/Nim library for live horse racing odds

Notifications You must be signed in to change notification settings

joenano/liveodds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

To build you will need Nim compiler, I would recommend using Choosenim to install and manage.

Python 3.7 or greater and the Nimporter and orjson packages are required. These can be installed with Pip.

pip install nimporter orjson
Install
git clone https://github.com/joenano/liveodds.git

Build files are included for compiling the library, or copy and paste from here.

Linux
nim c --gc: orc --threads:on --app:lib -d:ssl -d:release --out:lib/odds.so src/odds.nim
Windows
nim c --gc: orc --threads:on --app:lib --tlsEmulation:off -d:ssl -d:release --out:lib/odds.pyd src/odds.nim
Example
from lib.liveodds import Liveodds

liveodds = Liveodds()

# get tuple of all available races
races = liveodds.all_races()

# get dictionary of odds for all races
odds = liveodds.odds(races)
Structure

json

json

Will add more examples later, in the meantime, more info in docs.

About

Python/Nim library for live horse racing odds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published