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.4.tar.gz (7.8 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.4-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiosofascore-0.0.4.tar.gz
Algorithm Hash digest
SHA256 40725fc101c6b5643ec6a4176e57517fd5561ef45c47220589431625c47f0c52
MD5 dfdbae07f9a4c454fcda775a51af21f0
BLAKE2b-256 cca7e6ee7346a18da175b9182b090f871ede07f7bfda4b9af11ac328d64736db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiosofascore-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c11be407482afde457628f99cd25ad000a3d9f3f3a0bbdc322a282d94f3e9aab
MD5 fbe3622cb30eea60937f79e0246ca9d4
BLAKE2b-256 b61adf4d6521fb0a601b1d73ced1cb6a15ccadd4657eb9137dd52e02122b71ba

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