Skip to main content

♟️ elochess

CI codecov Python 3.11 uv Ruff mypy License: MIT

elochess is a simple python package for calculating chess ratings.

✨ Rating Systems

🎯 Accuracy

This project aims to replicate the exact official rating calulations.

For FIDE Elo and DWZ, the calculated ratings have been confirmed to be accurate in a large number of real scenarios.

For USCF rating, the calculated ratings are an estimate based on the "official" Rating Estimator. Here as well, it has been confirmed to be accurate in a large number of real scenarios. But keep in mind that this is a mere estimate of the real calculation which can only be performed by knowing all results of all players.

📦 Installation

pip install elochess

For CLI support:

pip install elochess[cli]

For API support:

pip install elochess[api]

🚀 Usage

🐍 Python

from elochess.elo import EloCalculator

current_rating = 1500
opponent_ratings = [1642, 1425, 1432]
score = 2.5

new_rating = EloCalculator.update_rating(
    current_rating,
    opponent_ratings,
    score
)

💻 CLI

elochess-cli update elo \
  --current 1500 \
  --opponent 1642 \
  --opponent 1425 \
  --opponent 1432 \
  --score 2.5

🌐 API

elochess-api

Check out the OpenAPI Spec at http://127.0.0.1:8000/docs.

📄 License

This project is licensed under the MIT License.

Metadata

Release files for elochess 0.5.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 elochess 0.5.0
File Size Uploaded Provenance Actions
elochess-0.5.0.tar.gz 14.0 kB With provenance Details for elochess-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 30.9 kB

Release files / elochess-0.5.0.tar.gz

Download URL elochess-0.5.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4620b1edac9ebf42acaa706fd8583840f9480661da603712fa87da6bff8e3319
BLAKE2b-256 checksum
How to use checksums
01c569289933b686b49f8817fc79bd22b4bdabd18fc9f8d95ad533562494fe2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 1, 2026.

Transparency log

Release files / elochess-0.5.0-py3-none-any.whl

Download URL elochess-0.5.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00c16d30e67bd16f5eb501351c244c874240e58f3c3aaec810fd0629abfb166c
BLAKE2b-256 checksum
How to use checksums
3c5fd660fc1ab2d7e374c7aab006aeb6625178a0e745bd4e59f4e2b1c7f34d4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 1, 2026.

Transparency log

Security for elochess 0.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for elochess-0.5.0.tar.gz

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 May 1, 2026.

Transparency log

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.

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