Skip to main content

A Python client for the FOGIS API (Svensk Fotboll)

Project description

fogis_api_client

A Python client for interacting with the FOGIS API (Svensk Fotboll).

Features

  • Authentication with FOGIS API.
  • Fetching match lists, team players, officials, and events.
  • Reporting match events and results.
  • Error handling and logging.

Installation

pip install fogis-api-client-timmyBird

Usage

import logging
from fogis_api_client.fogis_api_client import FogisApiClient, FogisLoginError, FogisAPIRequestError

logging.basicConfig(level=logging.INFO)

username = "your_fogis_username"
password = "your_fogis_password"

try:
    client = FogisApiClient(username, password)
    client.login()
    matches = client.fetch_matches_list_json()
    if matches:
        print(f"Found {len(matches)} matches.")
    else:
        print("No matches found.")
except FogisLoginError as e:
    print(f"Login failed: {e}")
except FogisAPIRequestError as e:
    print(f"API request error: {e}")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

Error Handling

The package includes custom exceptions for common API errors:

FogisLoginError: Raised when login fails.

FogisAPIRequestError: Raised for general API request errors.


Contributing

Contributions are welcome! Please open an issue or a pull request if you find any bugs or have suggestions.


License

MIT License

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

fogis_api_client_timmybird-0.0.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

fogis_api_client_timmyBird-0.0.2-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file fogis_api_client_timmybird-0.0.2.tar.gz.

File metadata

File hashes

Hashes for fogis_api_client_timmybird-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8db1ba92945fe2f99e7a2d56ed0b249326a83a2450bae1a2ac94aac759bc9217
MD5 def946011216473f68e9f4c77ecfda1b
BLAKE2b-256 54371e79178dc8cc2696aa4b07767728c27e1676bed0369a6a60f0e929491a29

See more details on using hashes here.

File details

Details for the file fogis_api_client_timmyBird-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fogis_api_client_timmyBird-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c750030caa4c8612838ea641007cd34542bcc578eccc1fbc7779d4db2a17f9b5
MD5 898c985b6fcd601230a7beb5df911e0a
BLAKE2b-256 7f81a5fbed7eb5137553d7516282c56569659b7299e21d110fe867ea7865330f

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