Skip to main content
Build Status Code Coverage Documentation Status PyPI Package

rcv is a Python library for tabulating ballots from ranked-choice elections. The package is distributed under the BSD 3-Clause License.

Examples

from rcv import FractionalSTV, PreferenceSchedule

schedule = PreferenceSchedule.from_ballots([
    ("Kamala", "Amy", "Elizabeth"),
    ("Kamala", "Elizabeth", "Amy"),
    ("Kamala", "Elizabeth", "Amy"),
])

stv = FractionalSTV(schedule, seats=2)
winners = stv.elect()

assert winners == {"Kamala", "Elizabeth"}

Metadata

Release files for rcv 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rcv 0.1.2
File Size Uploaded
rcv-0.1.2.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rcv 0.1.2
File Interpreter ABI Platform
rcv-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / rcv-0.1.2.tar.gz

Download URL rcv-0.1.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1ca2105d04bf2b42f13090dd9f56f99984b03b5bdde7c01d3afaf5d0b194f192
BLAKE2b-256 checksum
How to use checksums
5d8c64065de9d4bc2d317ba891471251b5540c353c627621057ccefd6efe4081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / rcv-0.1.2-py3-none-any.whl

Download URL rcv-0.1.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72b17454e11dbfeb599e677db42aaa0be408d27c578e37328afaa5d37f0bcdc7
BLAKE2b-256 checksum
How to use checksums
0597968efce3d4d3f4436da576ccd52801e631be96bfe8041adf8ce8491607c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page