Skip to main content

A pythonic interface to Cricbuzz that extracts Player stats

Project description

cricbuzzpy

A python library to extract Player info and stats from Cricbuzz

Installation

pip install cricbuzz-stats

Usage

from cricbuzzpy.player import Player

# create Player obj
p = Player()

# get player
p.get('jason holder')

{'id': 8313,
 'title': 'Jason Holder',
 'imageName': 'Jason Holder',
 'intro': 'Jason Holder',
 'country': 'West Indies',
 'publishedTime': '1575901896000',
 'imageId': '244677'}

# get player info
p.get_info(8313)

{'age': '31',
 'height': None,
 'role': 'bowling allrounder',
 'batting_style': 'right handed bat',
 'bowling_style': 'right-arm fast-medium'}

# get player stats
p.get_stats()

(       m inn no runs  hs   avg   bf      sr 100 200 50  4s  6s
 t20i  49  34  9  385  38  15.4  319  120.69   0   0  0  23  21
 ipl   38  24  5  247  47  13.0  199  124.12   0   0  0  13  17,
        m inn     b  runs wkts   bbi   bbm  econ    avg     sr 5w 10w
 t20i  49  46  1006  1370   51  5/27  5/27  8.17  26.86  19.73  1   0
 ipl   38  38   824  1177   49  4/52  4/52  8.57  24.02  16.82  0   0)

# init player with stats
p = Player('jason holder')
print(p)

        Name: Jason Holder
        Country: West Indies
        Info: {'age': '31', 'height': None, 'role': 'bowling allrounder', 'batting_style': 'right handed bat', 'bowling_style': 'right-arm fast-medium'}
        Batting Stats:        m inn no runs  hs   avg   bf      sr 100 200 50  4s  6s
t20i  49  34  9  385  38  15.4  319  120.69   0   0  0  23  21
ipl   38  24  5  247  47  13.0  199  124.12   0   0  0  13  17
        Bowling Stats:        m inn     b  runs wkts   bbi   bbm  econ    avg     sr 5w 10w
t20i  49  46  1006  1370   51  5/27  5/27  8.17  26.86  19.73  1   0
ipl   38  38   824  1177   49  4/52  4/52  8.57  24.02  16.82  0   0

Limitations

Only T20I and IPL stats for players are supported currently

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

cricbuzz-stats-0.0.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

cricbuzz_stats-0.0.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file cricbuzz-stats-0.0.2.tar.gz.

File metadata

  • Download URL: cricbuzz-stats-0.0.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for cricbuzz-stats-0.0.2.tar.gz
Algorithm Hash digest
SHA256 62942c634f4996c848fd3bf88b480645a9d4f0ac877a967ea7e5e94bf2c63d96
MD5 6975b8aa320d884e3a03553157960874
BLAKE2b-256 815a87fe2571441b8cea7c23bcfea06114e42e7422bc48034f89899aabdd8b5f

See more details on using hashes here.

File details

Details for the file cricbuzz_stats-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cricbuzz_stats-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3588c96068b45f565cffd7d2f7cf99f3eb64ad7c110193a1780596a28ee9cba0
MD5 6af2902e33c382c843eb02797e16cec5
BLAKE2b-256 2c5364b9e45f87cfb6633798a88b6823b887f2539144ef9727434216d974bc3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page