Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Iteracting with the playcricket API for statistical analysis and automated social media posts.
pyplaycricket is a package for extracting data programmatically from your playcricket site.
[fix link] Use the package manager pip to install pyplaycricket.
pip install pyplaycricket
Or install via Anaconda.
conda install -c conda-forge pyplaycricket
To use the PlayCricket APIs you need to:
They will confirm your site id and your API key.
The library is split into 4 main modules. 3 are generic playcricket modules which can be used for interrogating playcricket data. The Alleyn module has been created for club specific requests.
Retrieve all playcricket matches in a given season for your club.
from playcric.playcricket import pc
site_id = 'insert_your_site_id_here'
api_key = 'insert_your_api_key_here'
playc = pc(api_key=api_key, site_id=site_id)
matches = playc.get_all_matches(season=2024)
id | status | published | last_updated | league_name | league_id | competition_name | competition_id | competition_type | match_type | game_type | season | match_date | match_time | ground_name | ground_id | ground_latitude | ground_longitude | home_club_name | home_team_name | home_team_id | home_club_id | away_club_name | away_team_name | away_team_id | away_club_id | umpire_1_name | umpire_1_id | umpire_2_name | umpire_2_id | umpire_3_name | umpire_3_id | referee_name | referee_id | scorer_1_name | scorer_1_id | scorer_2_name | scorer_2_id | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 6571330 | New | Yes | 2024-04-19 00:00:00 | Friendly | Limited Overs | Standard | 2024 | 2024-04-27 00:00:00 | 10:00 | Edward Alleyn Club | 9352 | 51.4491 | -0.0915547 | Alleyn CC | Friendly XI | 320697 | 672 | Alleyn CC | Burbage Badgers | 268144 | 672 | ||||||||||||||||
1 | 6242035 | New | Yes | 2024-07-31 00:00:00 | Surrey Junior Cricket Championship | 10881 | U11 Surrey County Cup | 63219 | Cup | Limited Overs | Standard | 2024 | 2024-05-05 00:00:00 | 09:00 | Battersea Park | 56639 | 51.4802 | -0.155702 | Spencer CC, Surrey | BU11 Tier1A | 256417 | 5853 | Alleyn CC | Under 11 | 90654 | 672 | ||||||||||||
2 | 6242558 | New | Yes | 2024-07-31 00:00:00 | Surrey Junior Cricket Championship | 10881 | U14 Surrey County Cup | 63217 | Cup | Limited Overs | Standard | 2024 | 2024-05-05 00:00:00 | 09:30 | Morden Park Main Pitch | 57159 | 51.3888 | -0.210369 | AJ Cricket Academy | Under 14 | 257934 | 14870 | Alleyn CC | Under 14 | 59853 | 672 |
Retrieve a league table
from playcric.playcricket import pc
site_id = 'insert_your_site_id_here'
api_key = 'insert_your_api_key_here'
playc = pc(api_key=api_key, site_id=site_id)
league_table, key = playc.get_league_table(117611, simple=True, clean_names=False)
POSITION | TEAM | W | D | L | PTS | |
---|---|---|---|---|---|---|
0 | 1 | Horley CC, Surrey | 8 | 2 | 1 | 219 |
1 | 2 | Alleyn CC | 8 | 2 | 2 | 198 |
2 | 3 | Egham CC | 6 | 1 | 4 | 170 |
3 | 4 | Cobham Avorians CC | 6 | 1 | 5 | 166 |
4 | 5 | Byfleet CC | 6 | 0 | 6 | 158 |
5 | 6 | Kingstonian CC, Surrey | 6 | 1 | 6 | 149 |
6 | 7 | Thames Ditton CC | 5 | 1 | 4 | 147 |
7 | 8 | Effingham CC | 4 | 2 | 5 | 118 |
8 | 9 | Old Pauline CC | 4 | 0 | 8 | 111 |
9 | 10 | Churt and Hindhead CC | 2 | 0 | 10 | 79 |
Most of the IDs required for filtering on leagues, competitions, teams, clubs etc can be gleaned from the get_all_matches function. By default, this will return the matches associated with your site.
If you want to return all the fixtures for another club, you will need to find this on their playcricket site, at the bottom of the home page.
In pyplaycricket, you can:
I hope pyplaycricket makes it easier to return data from playcricket for a variety of different use cases.
FAQs
Iteracting with the playcricket API for statistical analysis and automated social media posts.
We found that pyplaycricket demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.