Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Python libraries for various electoral methods
Python
Branch: master

This branch is 1 commit ahead, 17 commits behind bradbeattie:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
pyvotecore
test_functionality
test_performance
.gitignore
CHANGES.rst
LICENSE.txt
MANIFEST.in
README.rst
gpl-3.0.txt
setup.py

README.rst

Python Vote Core

python-vote-core implements various electoral methods, providing the results calculated off a provided set of ballots and options.

Methods implemented

  • Single Winner Methods
    • Plurality (aka first-past-the-post or fptp)
    • Instant-Runoff Voting (aka IRV)
    • Schulze Method (aka Beatpath)
  • Multiple Winner Methods
    • Plurality at large (aka block voting)
    • Single Transferable Vote (aka STV)
    • Schulze STV
  • Ordering Methods
    • Schulze Proportional Representation
    • Schulze Nonproportional Representation

Basic Usage

Schulze method example:

print SchulzeMethod([
  { "count":3, "ballot":[["A"], ["C"], ["D"], ["B"]] },
  { "count":9, "ballot":[["B"], ["A"], ["C"], ["D"]] },
  { "count":8, "ballot":[["C"], ["D"], ["A"], ["B"]] },
  { "count":5, "ballot":[["D"], ["A"], ["B"], ["C"]] },
  { "count":5, "ballot":[["D"], ["B"], ["C"], ["A"]] }
], ballot_notation = "grouping").as_dict()
Something went wrong with that request. Please try again.