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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fogis_api_client_timmybird-0.0.5.tar.gz.
File metadata
- Download URL: fogis_api_client_timmybird-0.0.5.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f408223a9dc4d43b5ac50b05b308e16a3acbd6e6215bb7213f67956355680921
|
|
| MD5 |
e3db007c9ffdf446540a42e9faba11b4
|
|
| BLAKE2b-256 |
2bf6d7bc461f5c84e1f91a433588aa4a3094f305a4b2626401d93f9d90d8e402
|
File details
Details for the file fogis_api_client_timmybird-0.0.5-py3-none-any.whl.
File metadata
- Download URL: fogis_api_client_timmybird-0.0.5-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7d7cdce53d3d2557ba7c873c7cfe3243013ecf76d0fdcc26ffafc1f0cfa5229
|
|
| MD5 |
cf81d527d62cc58aa2f74747c5b238ec
|
|
| BLAKE2b-256 |
bd20081fded74b2d36fe5dae069c616e7c08836ae2969abb9737e81c8a104644
|