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.5.tar.gz (19.6 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.5-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for fogis_api_client_timmybird-0.0.5.tar.gz
Algorithm Hash digest
SHA256 f408223a9dc4d43b5ac50b05b308e16a3acbd6e6215bb7213f67956355680921
MD5 e3db007c9ffdf446540a42e9faba11b4
BLAKE2b-256 2bf6d7bc461f5c84e1f91a433588aa4a3094f305a4b2626401d93f9d90d8e402

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fogis_api_client_timmybird-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f7d7cdce53d3d2557ba7c873c7cfe3243013ecf76d0fdcc26ffafc1f0cfa5229
MD5 cf81d527d62cc58aa2f74747c5b238ec
BLAKE2b-256 bd20081fded74b2d36fe5dae069c616e7c08836ae2969abb9737e81c8a104644

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