cricapi
The cricapi, Free to use, super-high bandwidth, high performance Cricket API. Targeted at Developers and Cricket lovers.
The endpoints exposed are as follows:
cricapi.cricket( )provides live scrores of ongoing matchcricapi.matches( )provides upcoming match fixturescricapi.matchCalender( )provides international fixturescricapi.cricketScore( )provides detailed score card of the matchcricapi.playerStats( )provides players carrer info and statscricapi.fantasySummary( )provides match info and statscricapi.fantasySquad( )provides team players infocricapi.playerFinder( )provides players ids matching given name string
In order to use the above endpoints, u need to have an api_key which can use generated by signing into cricpapi. For testing purpose can use test_api_key "TESTKEY0273"
Usage of Cricapi:
>>> import cricapi
>>> apikey = "TESTKEY0273"
>>> criapi = cricapi.Cricapi(apikey)
matches
>>> criapi.matches()
{u'matches': [{u'toss_winner_team': u'Australia Women', u'team-2': u'Pakistan Women' ...}
cricket
>>> criapi.cricket()
{u'v': u'1', u'cache': True, u'provider': {u'url': u'https://cricapi.com/', u'source': ...}
matchCalender
>>> criapi.matchCalender()
{u'v': u'1', u'cache': True, u'provider': {u'url': u'https://criapi.com/', u'source': ...}
cricketScore
>>> params = {'unique_id':1034809}
>>> criapi.cricketScore(params)
{u'v': u'1', u'ttl': 3, u'team-2': u'India', u'matchStarted': True, u'team-1': u'England', u'provider': {u'url':u'https://cricapi.com/', u'source': u'Various', u'pubDate': u'2018-10-23T06:58:07.090Z'}, u'creditsLeft': 206}
playerStats
>>> params = {'pid':35320}
>>> criapi.playerStats(params)
{u'profile': u"\n\nSachin Tendulkar has been the most complete batsman of his time, the most prolific runmaker of all time, and arguably the biggest cricket icon the game has ...}
fantasySquad
>>> params = {'unique_id':1034809}
>>> criapi.fantasySquad(params)
{u'v': u'1', u'cache': True, u'provider': {u'url': u'https://cricapi.com/', u'source': u'Various', u'pubDate': u'2018-10-23T07:16:02.191Z'}, u'squad': [{u'players': [{u'pid': ... }
fantasySummary
>>> params = {'unique_id':1034809}
>>> criapi.fantasySummary(params)
{u'type': u'Test', u'ttl': 7, u'provider': {u'url': u'https://cricapi.com/', u'source': u'Various', u'pubDate': u'2018-10-23T07:20:22.701Z'}, u'dateTimeGMT': u'2016-11-09T04:00:00.000Z', u'v': u'1', u'data': {u'toss_winner_tea ...}
playerFinder
>>> params = {'name':'sachin'}
>>> criapi.playerFinder(params)
{u'ttl': 164, u'provider': {u'url': u'https://cricapi.com/', u'source': u'Various', u'pubDate': u'2018-10-23T07:24:47.164Z'}, u'v': u'1', u'data': [{u'fullName': u'Sachin Rana', u'pid': 33757, u'name': u'Sachin Rana'}, {u'full ...}
Cricapi officially supports Python 2.7 & 3.4–3.7, and runs great on PyPy.
Installation
To install Cricapi, simply use pipenv (or pip, of course):
$ pipenv install cricapi
Documentation
Fantastic documentation is available at http://docs.python-cricapi.org/.
How to Contribute
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
- Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
- Write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS.
Metadata
Release files for cricapi 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cricapi-1.2.tar.gz | 4.2 kB | Without provenance | Details for cricapi-1.2.tar.gz |
Release files / cricapi-1.2.tar.gz
| Download URL | cricapi-1.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9839344cca03d20215071b9bd4e2fb6c4b9db4c7b4349572b689051ac1e29848
|
|
BLAKE2b-256 checksum How to use checksums |
74436644a88ce391961dea793ae49313808ead8e6b427ccc45e145a43eee3cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Security for cricapi 1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.