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.4.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.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cricinfo_stats-1.0.4.tar.gz
Algorithm Hash digest
SHA256 87c3359a09b2e6d4222cb05160da468766d38f7f9e14b2c2c620c056cb0e5cda
MD5 7360371a1e45d3b77a7ad91187225533
BLAKE2b-256 752359fed7fcb11a6d76c09c25c57076c4c5bf5f899e648cce5ae4f5ebc55b73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cricinfo_stats-1.0.4-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.13.0

File hashes

Hashes for cricinfo_stats-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4d3a796448f1cf83832394fbaade25bb30815698281ae93f6ccf764675a5b2f1
MD5 ebf896cdc509951955da2ed272834129
BLAKE2b-256 f2963168175260a981edfd8ba915754a61f6250f7ddccf97fd9edf5691f069fc

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