libelifoot
Overview
Library to handle Elifoot 98 equipas. The main functionalities of the library are:
- Get the equipa data from an equipa file;
- Generate patch files with upstream data from an equipa file;
- Generate patches in batch from a directory of equipa files.
Usage
Get the content of an equipa file:
from sys import argv
from libelifoot import get_equipa_data
def main(equipa: str) -> None:
print(get_equipa_data(equipa))
if __name__ == "__main__":
main(argv[1])
Generate a patch file with upstream data from an equipa file:
from sys import argv
from typing import Optional
from libelifoot import (
update_equipa,
Equipa,
EquipaFileHandler,
UpdateEquipaListener
)
class EventHandler(UpdateEquipaListener):
def on_update_equipa(
self,
equipa_name: str,
equipa_data: Optional[Equipa]
) -> None:
print(f'{equipa_name}\n{equipa_data}')
if equipa_data:
EquipaFileHandler.write(f'{equipa_name}.patch', equipa_data)
def on_update_equipa_error(self, error: str) -> None:
print(f'ERROR: {error}')
def main(equipa: str, provider: str, season: int) -> None:
ev = EventHandler()
update_equipa(equipa, provider, season, ev)
if __name__ == "__main__":
main(argv[1], argv[2], int(argv[3]))
Generate patches in batch based on a directory of equipa files:
from sys import argv
from typing import Optional
from libelifoot import (
bulk_update,
Equipa,
EquipaFileHandler,
UpdateEquipaListener,
)
class EventHandler(UpdateEquipaListener):
def on_update_equipa(
self,
equipa_name: str,
equipa_data: Optional[Equipa]
) -> None:
print(f'{equipa_name}\n{equipa_data}')
if equipa_data:
EquipaFileHandler.write(f'{equipa_name}.patch', equipa_data)
def on_update_equipa_error(self, error: str) -> None:
print(f'ERROR: {error}')
def main(equipa_dir: str, provider: str, season: int) -> None:
ev = EventHandler()
bulk_update(equipa_dir, provider, season, ev)
if __name__ == "__main__":
main(argv[1], argv[2], int(argv[3]))
Supported providers
To generate patches, the library fetches data from public football data providers. Currently, the library supports the following providers:
- ESPN;
- Transfermarkt.
Documentation
See docs.
Metadata
Release files for libelifoot 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| libelifoot-0.1.3.tar.gz | 17.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libelifoot-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.0 kB
Release files / libelifoot-0.1.3.tar.gz
| Download URL | libelifoot-0.1.3.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4bd87529b774c2779b4230e07b34289b6c09712e4cf636e3bffe1ec0ad979dc
|
|
BLAKE2b-256 checksum How to use checksums |
8d5aa6ec2253866674c04ea53c3f582a31ca8472db274d490288bb23761ebb29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / libelifoot-0.1.3-py3-none-any.whl
| Download URL | libelifoot-0.1.3-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bde41b9a9d2cff11c2f849b5a56e983b33f2f60ca1c6d0048d14e6fd7e95ee85
|
|
BLAKE2b-256 checksum How to use checksums |
d98301c85d5e285cf7b8adec7b6d0e460951c481316b7b12cbf27b37818a9ba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for libelifoot 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.