Standings
Python library to calculate standings for football and handball
Getting Started
pip install standings
Alternatively: copy the standings package to your project.
Prerequisites
Should work with Python 2.7 and up or 3. Possibly other versions (untested).
Usage
It’s best to see standingstest.py for reference.
Basic usage is as follows:
# Handball 3. Liga Herren, Saison 2015/16, 17. Spieltag
# Create ranking calculation oject with scope, sports type and mode
t1 = Standings(TABLE_ALL, SPORTSTYPES.HANDBALL, CALCULATION_MODE_DIRECT_COMPARE)
# add your matches / fixtures (upto desired match day or all)
t1.add_match(_Match('DHK Flensborg', 35551, 'SC Magdeburg II', 35561, 41, 23))
t1.add_match(_Match('SV Meck.-Schwerin', 35651, 'TS Großburgwedel', 35661, 26, 17))
...
tb = t1.get_table()
# tb is now the sorted table
_Match may be replaced with your own object but as a minimum requires a team name and id for both participiants and goals for the home and away team.
The module supports two modes for calculation: CALCULATION_MODE_GOAL_DIFFERENCE and CALCULATION_MODE_DIRECT_COMPARE. The first one uses points, followed by goal difference and then goals scored as sort order (as used in German Bundesliga for example).
CALCULATION_MODE_DIRECT_COMPARE will first sort by points, then the result of direct comparison between teams with equal points (often used in handball or the Spanish La Liga).
Tests
Some tests are supplied and can be run like this:
python -m unittest standings python -m unittest standings.teampoint
License
This project is licensed under the MIT License - see the LICENSE.txt file for details
Metadata
Release files for standings 1.0.4
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 | Actions |
|---|---|---|---|---|
| standings-1.0.4.tar.gz | 9.3 kB | Without provenance | Details for standings-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| standings-1.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for standings-1.0.4-py2.py3-none-any.whl |
Total release size: 24.5 kB
Release files / standings-1.0.4.tar.gz
| Download URL | standings-1.0.4.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d586e4890e40f8b97eeb517c59d8fe457bfd2edc8de93d5cbce9e73fe6339410
|
|
BLAKE2b-256 checksum How to use checksums |
64d5009abe0891d34e8be62ab02741508439b272825d911af434e9d593d25274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15
|
Release files / standings-1.0.4-py2.py3-none-any.whl
| Download URL | standings-1.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
66c5e3bbb5b3692ccc323d24bf269c057248143427eee4a2e0d422b75055c121
|
|
BLAKE2b-256 checksum How to use checksums |
4fe204ff180b0666fa3f982a0a473fcbd5e659008c94e7f433efb1787fb6b889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15
|
Security for standings 1.0.4
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.