Skip to main content

Python Binding (API wrapper) for the Football API.

Project description

footballAPIClient

A simple wrapper around the football API provided by @API-SPORTS. For full documentation on the API endpoints and subscription details, refer to API-FOOTBALL. Usage of this package requires any level of subscription and an API-KEY.

Installation

pip install footballapiclient

Usage

Create the client

from  footballAPIClient  import  footballAPI

fp  =  footballAPI.FootballAPI("api-sports", api_key="YOUR_API_KEY")

Arguments:
- account_type: Indicates weather the account is used from Rapid-API or from dashboard. It consists of values: "rapid-api", and "api-sports", passing values other than this will raise an error.
- api_key: Valid API key required, or, it must be accessible via API_KEY environment variable.

Examples

Getting the country data by calling the countries API.

print(fp.get_countries())


Arguments:
name: (optional) The name of the country  
code:  (optional) The Alpha2 code of the country 
search:  (optional) The name of the country
:return: Returns the Country json schema

Output:

{ "get": "countries", "parameters": { "name": "england" }, "errors": [], "results": 1, "paging": { "current": 1, "total": 1 }, "response": [ { "name": "England", "code": "GB", "flag": "https://media.api-sports.io/flags/gb.svg" } ] }

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

footballapiclient-0.0.4.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

footballapiclient-0.0.4-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file footballapiclient-0.0.4.tar.gz.

File metadata

  • Download URL: footballapiclient-0.0.4.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.13 Windows/10

File hashes

Hashes for footballapiclient-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a078f03b163496ed83cf1e18cf5ef3e7cd14e0524748eafd096bc06a9aba360d
MD5 1e9d150b4d8a972090bc684a3ab20806
BLAKE2b-256 7068514605679562f65d06a8a7cb497232d1e0c04aad8695c2acadcbae03e50e

See more details on using hashes here.

File details

Details for the file footballapiclient-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for footballapiclient-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ea17985141993ff12a1d2c83b5e1d211533d6efe6504455c3020aed05532c435
MD5 4ac453c3e5f3ffe4decf35902969574b
BLAKE2b-256 6ae64878f6446816b41ed0c9e6868ae5c9bd0370378d1818fab466e515fe5a5d

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