Skip to main content

Python bindings for Elo-MRR

Project description

Installation

You can install using pip. This is the easiest way to install the package and its dependencies.

Install from PyPI

To install the latest released version from PyPI, run the following command:

pip install q-elo-mmr-py

This will download and install the latest version of Elo-MMR-Py from PyPI.

Usage

After installation, you can import and use Elo-MMR-Py in your Python projects:

from elo_mmr_py import Contest, rate

contests = [
    Contest(standings=[('player_1', 0, 0), ('player_2', 1, 1), ('player_3', 2, 2)]),
    Contest(standings=[('player_1', 0, 1), ('player_2', 0, 1), ('player_3', 2, 2)]),
    Contest(standings=[('player_1', 0, 0), ('player_2', 1, 2), ('player_3', 1, 2)]),
    Contest(standings=[('player_4', 0, 0), ('player_1', 1, 1), ('player_2', 2, 2), ('player_3', 3, 3)]),
    Contest(standings=[('player_4', 0, 0), ('player_1', 1, 1), ('player_2', 2, 2), ('player_3', 3, 3)]),
]
rate(contests)

Output for example above:

{'player_1': Player(name='player_1',
                    rating=1675,
                    events=[PyPlayerEvent(contest_index=0, rating_mu=1705, rating_sig=171, perf_score=1744, place=0),
                            PyPlayerEvent(contest_index=1, rating_mu=1663, rating_sig=130, perf_score=1618, place=0),
                            PyPlayerEvent(contest_index=2, rating_mu=1686, rating_sig=111, perf_score=1728, place=0),
                            PyPlayerEvent(contest_index=3, rating_mu=1678, rating_sig=100, perf_score=1660, place=1),
                            PyPlayerEvent(contest_index=4, rating_mu=1675, rating_sig=94, perf_score=1666, place=1)]),
 'player_2': Player(name='player_2',
                    rating=1483,
                    events=[PyPlayerEvent(contest_index=0, rating_mu=1500, rating_sig=171, perf_score=1500, place=1),
                            PyPlayerEvent(contest_index=1, rating_mu=1555, rating_sig=130, perf_score=1618, place=0),
                            PyPlayerEvent(contest_index=2, rating_mu=1500, rating_sig=111, perf_score=1393, place=1),
                            PyPlayerEvent(contest_index=3, rating_mu=1487, rating_sig=100, perf_score=1459, place=2),
                            PyPlayerEvent(contest_index=4, rating_mu=1483, rating_sig=94, perf_score=1471, place=2)]),
 'player_3': Player(name='player_3',
                    rating=1279,
                    events=[PyPlayerEvent(contest_index=0, rating_mu=1295, rating_sig=171, perf_score=1256, place=2),
                            PyPlayerEvent(contest_index=1, rating_mu=1270, rating_sig=130, perf_score=1242, place=2),
                            PyPlayerEvent(contest_index=2, rating_mu=1312, rating_sig=111, perf_score=1393, place=1),
                            PyPlayerEvent(contest_index=3, rating_mu=1291, rating_sig=100, perf_score=1240, place=3),
                            PyPlayerEvent(contest_index=4, rating_mu=1279, rating_sig=94, perf_score=1247, place=3)]),
 'player_4': Player(name='player_4',
                    rating=1809,
                    events=[PyPlayerEvent(contest_index=3, rating_mu=1767, rating_sig=171, perf_score=1819, place=0),
                            PyPlayerEvent(contest_index=4, rating_mu=1809, rating_sig=130, perf_score=1855, place=0)])}

Contributing

Welcome contributions! If you would like to contribute to the project, please fork the repository and submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

q_elo_mmr_py-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

q_elo_mmr_py-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

q_elo_mmr_py-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

q_elo_mmr_py-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

q_elo_mmr_py-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

q_elo_mmr_py-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

Details for the file q_elo_mmr_py-1.0.0.tar.gz.

File metadata

  • Download URL: q_elo_mmr_py-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for q_elo_mmr_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d8d582be1b7832f20665f123df92f7275ae1bb1cc40d42781d6a6f146aabafa9
MD5 114daf07ed3f484838a452f418e294c1
BLAKE2b-256 ea8a82d344cfd1b6ee08d6e4cc64bfa949b1a2d73bbd7d536dbf92d9129620da

See more details on using hashes here.

File details

Details for the file q_elo_mmr_py-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for q_elo_mmr_py-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9641d1c7aacc722cdc5b0fa7dbd8acae784dc1adf50294065b232bf12b3d14b9
MD5 1a0c099011e45dd4085b7ebc68f87694
BLAKE2b-256 e8bd5384d109099e2471f0afb8db9c0c722a2e5becb7570453817f5d20d7e593

See more details on using hashes here.

File details

Details for the file q_elo_mmr_py-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for q_elo_mmr_py-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 88e211db33dabda9927deb91d2034ff0ac9ba0efc89faffff0e901b4a5fd45a1
MD5 906be45d7d35ab923c9aacefee96f947
BLAKE2b-256 5f003a742b38b14c0a377a8941ea56bcc75664daf904885c1457dfed4a3ee02a

See more details on using hashes here.

File details

Details for the file q_elo_mmr_py-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for q_elo_mmr_py-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d649081e3455c61e22e6a62e9ee2d824cbccf077fd14520023a0d41be395d92
MD5 32b5086610163165f3685511ca8e76be
BLAKE2b-256 15b5f7a1e4e1defb0de234891625fe61876da104e2b2550f27269d43b0a8cb0f

See more details on using hashes here.

File details

Details for the file q_elo_mmr_py-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for q_elo_mmr_py-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8614ba7edf76c11da951dd338276a5d1b50d3e4367e41e7b04a8955cf73fe140
MD5 8589848abbc5f0d53ef5d56a8800cc4e
BLAKE2b-256 076bf44d9f168025afe62acae4a419b82a90a734b201bbedc5c7a784b1fd4035

See more details on using hashes here.

File details

Details for the file q_elo_mmr_py-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for q_elo_mmr_py-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 51f867188a0efa51443ce6f0112f6bed37d3fd22e4cf5ceced788f72c6cff817
MD5 8d1b3f8a6e7f303d7061c3fa0e8c6739
BLAKE2b-256 2cc668f5799ee6290f22f96e60884e3a96bd93d34e51c6c3994b84c39117ea2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page