multi_elo
Python ELO score calculator for more than two players. It can be used e.g. for a 4 player multiplayer match and for team-based games as well.
Install
pip install multi_elo
Compatibility
Python 3.5+
Usage
from random import randint
from multi_elo import EloPlayer, calc_elo
# Generate players with random ELO.
# It can be a list of any elements having the `place` and `elo` properties.
elo_players = [EloPlayer(place=place, elo=randint(1200, 1800))
for place in range(1, 5)]
print('Original ELO scores:')
for player in enumerate(elo_players, start=1):
print(f'{i}: #{player.place} ({player.elo})')
# Set the K factor (optional)
k_factor = 16
# Calculate new ELO scores
new_elos = calc_elo(elo_players, k_factor)
print('\nNew ELO scores:')
for i, new_elo in enumerate(new_elos, start=1):
print(f'{i}: {new_elo}')
Development
# install dependencies
pip install requirements_dev.txt
# run tests with all of the supported python interpreters
tox
# or only with the currently active python interpreter
pytest
Metadata
Release files for multi-elo 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| multi_elo-2.0.0.tar.gz | 2.7 kB | Without provenance | Details for multi_elo-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| multi_elo-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for multi_elo-2.0.0-py3-none-any.whl |
Total release size: 10.1 kB
Release files / multi_elo-2.0.0.tar.gz
| Download URL | multi_elo-2.0.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5129cc4861bd42a5e8cd07ecd89e1e780cb0e9f5c0f22107b1e2c31b92104d55
|
|
BLAKE2b-256 checksum How to use checksums |
c9e2cd1b2092154aa671a9f158c27b43fb786b43058bac7848297b4be426db75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1
|
Release files / multi_elo-2.0.0-py3-none-any.whl
| Download URL | multi_elo-2.0.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e1f81e18a8333121b97406e8a591cf3ba7b881cede2df9fc4cc2ab9320fe557
|
|
BLAKE2b-256 checksum How to use checksums |
e5cae7a1d407dbe9b3e4ae8f1408f939f33033ffd6bc63b480dd71c96301830b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1
|
Security for multi-elo 2.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.