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.3.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.3-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for fogis_api_client_timmybird-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1436c2881fb46d73195a92ed5a649a1458b93b4358f3e0d1d2f13c15bf3a1774
MD5 b4bf5f83b5b702baaa1ce064063d4422
BLAKE2b-256 752d5d7b3196e4e2b662d5ad2678e3be04007c101373752ff7a6a13e229bc857

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fogis_api_client_timmyBird-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 686cdb0c8cdd7c6ad3f4b70084aeb5edd796b54036f976cbf3fa3650f36ca6c0
MD5 e67abadfb0447af9533f2691a944fb41
BLAKE2b-256 948c5f19a746f72c916a2fefc786ca42da17fb5633749ac3ad07282874ae4fff

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