Skip to main content

API client for SofaScore soccer data

Project description

PyPI Version LICENSE

Aiosofascore

Aiosofascore is an API client for SofaScore's soccer data, designed to provide easy access to soccer categories, tournaments, events, and much more. It is built with aiohttp for asynchronous HTTP requests and can be integrated into any Python project that needs soccer-related data.

Features

  • Fetch soccer categories and tournaments
  • Get detailed tournament standings and seasons
  • Retrieve pregame forms, head-to-head stats, and event managers
  • Built using Python's asynchronous capabilities with aiohttp

Installation

To install aiosofascore from PyPI, run the following command:

pip install aiosofascore

Usage Example

Here's how you can use aiosofascore to get data about football tournaments

import asyncio
from aiosofascore import BaseSoccerApi


async def main():
    # Create a client
    client = BaseSoccerApi()

    # Fetch categories
    categories = await client.get_categories()
    for category in categories:
        print(f"Category: {category.name}")

    # Fetch tournaments by category
    tournaments = await client.get_tournaments_by_category(categories[0])
    for tournament in tournaments:
        print(f"Tournament: {tournament.name}")


if __name__ == "__main__":
    asyncio.run(main())

License

This project is licensed under the MIT License — see the LICENSE file for details.

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

aiosofascore-0.0.5.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiosofascore-0.0.5-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file aiosofascore-0.0.5.tar.gz.

File metadata

  • Download URL: aiosofascore-0.0.5.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for aiosofascore-0.0.5.tar.gz
Algorithm Hash digest
SHA256 3db07e3785c26d5ecb4c2612d9f3bd2f9be01e3af8fe87d2a71b5ccc5d895fa4
MD5 b79e1da351a2c2b5cf874220f5694d18
BLAKE2b-256 ae2c9638e4e2990963a50c0408922854dc0e559167c86ab556e38303d03f8f86

See more details on using hashes here.

File details

Details for the file aiosofascore-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: aiosofascore-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for aiosofascore-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c4facfbf5f666c61dcdfe4c3c6927ecee10e0a793233b54039ee982224cc0f0f
MD5 302e384cdbd1fd3a071d8cb5759b23d8
BLAKE2b-256 2855583ebcb41594662a9411b113787b3d1a43f8b5ec86c1a0045b47f5024ba7

See more details on using hashes here.

Supported by

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