Skip to main content

Python Wrapper around Chess.com API

Project description

Python wrapper for Chess.com Public API

Description & Implementation

Python wrapper for Chess.com API which provides public data from the chess.com website. All endpoints provided by Chess.com's API are available in the respectively named methods.
Install the package with: pip install chess.com
https://pypi.org/project/chess.com/

Usage

Please refer to https://chesscom.readthedocs.io/ and https://www.chess.com/news/view/published-data-api for documentation. Below is a simple example of the usage.

from chessdotcom import get_player_profile

data = get_player_profile("fabianocaruana")

Optional Headers can also be set. Official Chess.com documentation recommends adding a user-agent header.

#optional
from chessdotcom import Client
Client.headers = {"User-Agent": "My Python Application. Contact me at email@example.com"}

All the methods from the module will now include the header when making the request to the API.

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

chess.com-1.4.1.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file chess.com-1.4.1.tar.gz.

File metadata

  • Download URL: chess.com-1.4.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.6

File hashes

Hashes for chess.com-1.4.1.tar.gz
Algorithm Hash digest
SHA256 c1b7b12936a6f6b66a6f5fde132be4dc984cf8cb51d3af6dfd1668fa804cbef6
MD5 afdeea6d6314fbf5de2cf5417d3f15c7
BLAKE2b-256 04f2f4969f2d97ba2c7382bd6ed465a04e564fbbf34a3423b0ac5b7ab81c7dda

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