/schulze-method

A Python 3 implementation of the Schulze method for ranking candidates.

Primary LanguagePythonApache License 2.0Apache-2.0

Schulze Method Build status Updates Python 3 Code coverage

This repository provides a Python implementation of the Schulze method.

Requirements

  • Install the latest version of Python 3.X.

  • Install the required packages:

pip install -r requirements.txt

Usage

To rank candidates, import and call:

from schulze import compute_ranks

schulze_ranking = compute_ranks(candidate_names, weighted_ranking_orders)
from schulze import compute_schulze_ranking

schulze_ranking = compute_schulze_ranking(candidate_names, ballots)