Skip to main content

sportinf

Sportinf is a convenient python module to get data of sport teams, players, leagues and events. You can know information from many sports, such as: football, hockey, basketball, tennis, golf, athletics and so on. Sportinf gets data from TheSportsDB API (<https://www.thesportsdb.com>).

Installation

Python >= 3.5

pip install sportinf

Usage

First things first we have to import class called SportInfo:

from sportinf import SportInfo

After this we make an object of this class:

info = SportInfo(option=”name of the option”, name_of_parameter=”value of the parameter”)

First parameter is option. This parameter shows what information you want to get. Here are all options that available in module and their description:

  • Information about team - shows an information about team. Requires name of the team.

  • Information about player - returns an information about player. Requires first and last name of the player.

  • Information about event - shows an information about event. Requires name of the event.

  • List all sports - returns list of all sports that available in this module. Requires nothing.

  • List all leagues - returns list of all leagues from any sport and country that available in this module. Requires nothing.

  • List all countries - returns list of all countries that available in this module. Requires nothing.

  • List all Seasons in a League - returns list of all seasons from any league that available in this module. Requires name of the league.

  • List all Teams in a League - returns list of all teams from any league that available in this module. Requires name of the league.

  • League Details - shows a detailed information about any league. Requires name of the league.

  • Player Honours - shows all honours that player got through his career. Requires first and last name of the player.

  • Player Former Teams - returns all former teams of player. Requires first and last name of the player.

  • Player Contracts - shows an information about contract by player. Requires first and last name of the player.

  • Lookup Table by League and Season - shows a table from any league and season. Requires name of the league and season.

  • Lookup Equipment by Team - returns an information about every equipment by team. Requires name of the team.

  • Last 15 Events by League - shows an information about 15 last events from any league. Requires name of the league.

When you created an object of SportInfo class, you have to write only option and those parameters that are written in the description for every option. For example, you need to an information about player Lionel Messi. You have to write next:

info = SportInfo(option=”Information about player”, player_name=”Lionel Messi”)

You get a result as python dictionary. In this dictionary keys are parameters. For every option they are different. List of all parameters for every option you can find in parameters.txt. So, if you want to know an information for player Lionel Messi, you will result like in result_Lionel_Messi.txt.

Sometimes happens situation when you get more than one result. For instance, when you want to know information about team called Arsenal, you will get data about six teams, such as: Arsenal London, Arsenal U21, Arsenal WFC, Arsenal Kyiv, Arsenal Tula and Arsenal Sarandi. In this case sportinf will return dictionary, where as a key will be name of the team, league, event etc. As a value will be dictionary with parameters and values of this one.

Configuration

There is nothing to configure

Credits

Contributors

Author & Maintainer

This module is maintained by Alexander Maudza

Metadata

Release files for sportinf 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sportinf 1.1.2
File Size Uploaded Provenance Actions
sportinf-1.1.2.tar.gz 131.4 kB Without provenance Details for sportinf-1.1.2.tar.gz

Release files / sportinf-1.1.2.tar.gz

Download URL sportinf-1.1.2.tar.gz
Size 131.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3e3bbc6ca0e532636c0263359e93f20e76db7a4c4095287260289407e1519cb
BLAKE2b-256 checksum
How to use checksums
7c2381708e3b252191910b10afa83e487ec639ae701197455f41b8b567e3ba78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2

Security for sportinf 1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page