woctezuma / schulze-method

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Schulze Method

Build status with Github Action Code coverage Code quality

This repository provides a Python implementation of the Schulze method.

Requirements

  • Install the latest version of Python 3.X (at least version 3.10).

  • 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)

About

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

License:Apache License 2.0


Languages

Language:Python 100.0%