Skip to main content

Elo-MMR-Py

CI Documentation PyPI Python License: MIT

Fast Python bindings for Elo-MMR, a multiplayer rating method designed for contests with many participants. The rating calculation runs in Rust and releases Python's GIL, while the public API uses ordinary Python objects and precise type information.

The exact mmr algorithm is the default. The approximate mmr-fast variant remains an explicit choice.

Installation

python -m pip install Elo-MMR-Py

Binary ABI3 wheels support standard CPython 3.11 and newer on Linux x86_64 and aarch64, macOS x86_64 and arm64, and Windows x86_64. PyPy, free-threaded CPython, and 32-bit platforms do not have prebuilt wheels.

Quickstart

Use rate_latest() for leaderboards and services. It creates one immutable PlayerRating per participant instead of one Python object per historical event.

from elo_mmr_py import Contest, rate_latest

contests = [
    Contest(
        standings=[('Ada', 0, 0), ('Grace', 1, 1), ('Linus', 2, 2)],
        name='Example final',
        time_seconds=1_700_000_000,
    )
]

leaderboard = sorted(rate_latest(contests).values(), key=lambda player: -player.rating)
for player in leaderboard:
    print(player.name, player.rating, player.rating_sig, player.contests_played)

Use rate() when you need every historical rating event:

from elo_mmr_py import rate

players = rate(contests)  # system='mmr' is the exact default
ada_history = players['Ada'].events

Long-running services can retain state with Rater, and advanced Elo-MMR users can pass an immutable EloMmrConfig. Their canonical interfaces and executable example are in the API documentation.

Standings and ties

A standing is (name, low_rank, high_rank). Ranks are zero-based and inclusive. An ordinary result has low_rank == high_rank; tied participants repeat the same interval. See Contest representation for a tie example and the complete ordering rules.

Rating systems

mmr is the recommended exact default. mmr-fast is an explicit approximation whose benefit depends on the workload. See Rating systems for every supported mode and its constraints.

Checkpoints

Both APIs accept str | os.PathLike[str] checkpoint paths and can atomically save or resume rating state. The checkpoint guide is the canonical reference for the schema, migration, compatibility, file permissions, symlinks, and failure behavior.

Documentation and development

The complete guide covers concepts, API details, checkpoints, performance, errors, development, and releasing. Source setup and all required checks live in the development guide; see CONTRIBUTING.md for contribution policy.

Metadata

Release files for Elo-MMR-Py 2.0.0

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

Source distribution (sdist)

Source distribution for Elo-MMR-Py 2.0.0
File Size Uploaded
elo_mmr_py-2.0.0.tar.gz 134.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for Elo-MMR-Py 2.0.0
File
elo_mmr_py-2.0.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
elo_mmr_py-2.0.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
elo_mmr_py-2.0.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
elo_mmr_py-2.0.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
elo_mmr_py-2.0.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 2.5 MB

Release files / elo_mmr_py-2.0.0.tar.gz

Download URL elo_mmr_py-2.0.0.tar.gz
Size 134.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e52cdc24f715e73bacf67e8fd793878ead8837f1a9c4a63be5ce0cc35aa6e82d
BLAKE2b-256 checksum
How to use checksums
b03952c0a4c6844343a21afac987683fa1b1ae5e563c96d8c0ffe2a3f14873f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / elo_mmr_py-2.0.0-cp311-abi3-win_amd64.whl

Download URL elo_mmr_py-2.0.0-cp311-abi3-win_amd64.whl
Size 435.7 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4373ddd52780bf27667a689175b9bed0ce3b7f6ecce3d84295ca01ec00866320
BLAKE2b-256 checksum
How to use checksums
39787a1a1739fe50de3e35af43acb3aa715400b31a0ae0b3095e5eef9aec7791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / elo_mmr_py-2.0.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL elo_mmr_py-2.0.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 521.1 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
53b13237501afd434aab806de31c0cc263725c9816c3244b85f27973fa70af5e
BLAKE2b-256 checksum
How to use checksums
5f40dde094483e0dacb643051a354e0f1e2be1b0cd9d2dc1a3c9c706700d07fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / elo_mmr_py-2.0.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL elo_mmr_py-2.0.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 492.6 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
db3e7f8802a9499be188110b71ea618d9789dcbb2bebb7a2e7df9ed881e2c572
BLAKE2b-256 checksum
How to use checksums
df66597db3d79d676ccc6ebcd984075ac2ac8265c441218d45de7a1202e4b763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / elo_mmr_py-2.0.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL elo_mmr_py-2.0.0-cp311-abi3-macosx_11_0_arm64.whl
Size 466.6 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cb06954332433444eec6067eafb13bf89ffb8cd9db13eaf6dded19a9954d2059
BLAKE2b-256 checksum
How to use checksums
d8a222913ba85aecd618c4b131e0abeef01f92f68733c5ee5a63d31d5c71c879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / elo_mmr_py-2.0.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL elo_mmr_py-2.0.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 483.5 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
eac8a4849701b13a4507d5a59380a576aff98a84731150c12bd963582b09a9a7
BLAKE2b-256 checksum
How to use checksums
0f9e20baff8e9b447593d1ece97c7d3ef4984934e664e1fcd4d07b9a4ffa1b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

6 release files

1.0.3

25 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