no-teg
A library for running tournaments
Overview
'no-teg' (get-on backwards) is a library for running tournaments. In the beginning it will be simple i.e. setting up and advancing through different tournament styles. Eventually if things go smoothly the library will also compute data on the tournaments and players. Being open-source, I hope that people will add tournament styles and different analysis that are dependent on different games.
Install:
pip install no-teg
Usage example: Create and run a basic single elimination tourament.
from no_teg import *
p1 = Player("P1")
p2 = Player("P2")
p3 = Player("P1")
p4 = Player("P2")
MyGame = Game()
MyTourney = Single_Elimination(MyGame)
MyTourney.add_players([p1, p2, p3, p4])
MyTourney.start()
MyTourney.print_matchups()
1: P2 (A) vs P1 (H)
2: P4 (A) vs P3 (H)
# arguments are matchup_id, away_score, home_score
MyTourney.input_result(1, 3, 2)
MyTourney.input_result(2, 0, 4)
MyTourney.print_results()
1: P2 (3) vs P1 (2)
2: P4 (0) vs P3 (4)
#P2 and P3 advance to the finals
MyTourney.print_matchups()
1: P2 (A) vs P1 (H)
2: P4 (A) vs P3 (H)
3: P2 (A) vs P3 (H)
#P2 wins the tournament!
MyTourney.input_result(3, 2, 1)
MyTourney.print_results()
1: P2 (3) vs P1 (2)
2: P4 (0) vs P3 (4)
3: P2 (2) vs P3 (1)
Makefile commands:
make: list available commandsmake develop: install and build this library and its dependencies usingpipmake build: build the library usingsetuptoolsmake lint: perform static analysis of this library withflake8andblackmake format: autoformat this library usingblackmake annotate: run type checking usingmypymake test: run automated tests withpytestmake coverage: run automated tests withpytestand collect coverage informationmake dist: package library for distribution
Metadata
Release files for no-teg 0.2.1
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 |
|---|---|---|---|---|
| no-teg-0.2.1.tar.gz | 23.5 kB | Without provenance | Details for no-teg-0.2.1.tar.gz |
Release files / no-teg-0.2.1.tar.gz
| Download URL | no-teg-0.2.1.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de874f0ceb5646a4febfda38e9207921c964e2658f03b5940d47e43e97337283
|
|
BLAKE2b-256 checksum How to use checksums |
9cbc22b3427cd9d6587b970590f1fd155e63797b83cf37c7ad506dd0e361a383
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for no-teg 0.2.1
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.