Skip to main content

Python/Pandas Client for https://www.espncricinfo.com stats

Project description

cricinfo

Library for loading cricket stats from https://www.espncricinfo.com into pandas dataframes.

Features

  1. Career batting/bowling/fielding/all-round statistics for international cricketers.
  2. Statistics for all partnerships in international cricket for a given team.
  3. Aggregated statitics for teams in international cricket.

Teams Supported

England
Australia
SouthAfrica
WestIndies
NewZealand
India
Pakistan
SriLanka
Zimbawe

Formats Supported

TEST
ODI
T20I
International

Sample Usage

from cricinfo import Cricinfo
from cricinfo import MatchFormat
from cricinfo import Team

df = Cricinfo.retrieve_batting_stats(team=Team.Pakistan, match_format=MatchFormat.Test)

Code Quality

Run test and lint commands from the root of this repo.

Testing

coverage run -m pytest -v -s
coverage report -m

Linting

ruff check .

Documentation

cp README.md docs/source/README.md
cd docs/
make clean
make html

Packaging

Update version for the library as well as the docs:

  1. setup.py
  2. docs\source\conf.py

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

cricinfo_stats-1.0.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

cricinfo_stats-1.0.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file cricinfo_stats-1.0.3.tar.gz.

File metadata

  • Download URL: cricinfo_stats-1.0.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cricinfo_stats-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0ab3bc58d1ca1079461ff341476f8961dfb689bcdd70e6738e2b7a6c6b5f047a
MD5 24c38cdbb281fca726d4ed6c83fa2779
BLAKE2b-256 2c4c93aba9e33d065e1b682bd1ecabfa694506b01bac963e1ca31b2471627d03

See more details on using hashes here.

File details

Details for the file cricinfo_stats-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: cricinfo_stats-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cricinfo_stats-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 030dab6f7b03b6024b0f274a35518dd458f406c513c859a2d13743035a89b878
MD5 81370b624ddbc08edad2e8a9d67396e6
BLAKE2b-256 1e8eab8b91804a20ddcede0c5f3ce920f1412acc587f93ecd72f6f21f1f64a16

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