Python APIΒΆ

Elex provides a Python API that encapsulates Associated Press Election API results as Python objects.

To use the election loader manually from within your project:

from elex.api import Election

election = Election(electiondate='2015-11-03', testresults=False, liveresults=True, is_test=False)
races = election.races

Now you can process or load races.

Models:

Utilities: