polyhattrick
Your Hattrick club in the terminal: team, league
table, squad, players, training, staff and matches, as tables, as JSON for
scripts, or in a full-screen interface. It also puts your live match score in
polybar.
polyhattrick only reads your data; it cannot change anything in your club.
Installation
pip install polyhattrick
Logging in
polyhattrick login start
Open the page it prints, allow polyhattrick to read your data, and copy the PIN Hattrick shows you. Then:
polyhattrick login finish PIN
The login stays valid until you revoke it on Hattrick. polyhattrick logout
removes it from this machine.
Commands
polyhattrick team list # your teams
polyhattrick team show # league, series, cup, power rating
polyhattrick series show # your series table, with promotion and relegation places
polyhattrick series fixtures # every match of your series this season (--season -1, --round N)
polyhattrick players list # the squad with skills
polyhattrick player show PLAYER_ID # one player in full
polyhattrick training show # this week's and last week's training
polyhattrick club show # staff levels and youth academy
polyhattrick matches list # recent and upcoming matches
polyhattrick matches history # every match of this season (--season -1 for the last one, --type league)
polyhattrick match show MATCH_ID # ratings, key moments and both lineups (--events, --no-lineups, --team ID)
polyhattrick challenges list # friendly challenges made and received
polyhattrick cups list # your league's cups and the round each has reached
polyhattrick cup show # your cup round, starting at your match (CUP_ID, --round, --after for the next page)
polyhattrick browse # the full-screen interface
Youth
polyhattrick youth team show # your youth team, its series and its scouts
polyhattrick youth players list # the youth squad: skills as current/maximum, promotion, last match
polyhattrick youth player show ID # one youth player: skills, scout report, last match
polyhattrick youth series show # your youth series table
polyhattrick youth series fixtures # every match of the youth series (--season -1, --round N)
polyhattrick youth matches list # recent and upcoming youth matches
polyhattrick youth matches history # played youth matches Hattrick still keeps (about three months)
They use your primary club's youth team; --team TEAM_ID picks another of
your senior teams, --youth-team ID any youth team (another club's shows no
skills or scout reports). In the skill columns yellow means fully trained,
green means the maximum is shown but there are still sub-levels to gain.
Commands about a team use your primary club; pass --team TEAM_ID for
another one (polyhattrick team list shows the identifiers). The match
lists show each match's identifier for match show. Tournament and ladder
matches have their own numbering, so their identifiers carry a prefix
(hto-41870715), and so do youth matches (youth-145407283); --json
output has the plain number with "source_system" instead.
In scripts
Every read command takes --json and then prints the server's response
unchanged on stdout. Errors go to stderr, and the exit code tells what went
wrong: 0 success, 1 something to fix on your side (not logged in, wrong
identifier, not your team), 2 the server or Hattrick failed.
polyhattrick players list --json | jq '.[] | {name: .last_name, playmaking: .skills.playmaking}'
The full-screen interface
polyhattrick browse shows the same sections on one screen. Arrow keys
move, enter on a section moves into it, enter on a player (senior or youth) or a
played match opens it, escape goes back, r refreshes, t
switches to your next team, q quits.
Integration with polybar
polyhattrick match live watch
prints the first match on your Hattrick live ticker as one line, and nothing at all if something fails, so the bar never fills with error text. Add it as a module:
[module/hattrick]
type = custom/script
exec = polyhattrick match live watch
To show a different match, reorder your live ticker on the Hattrick website.
Configuration
Optional, in ~/.config/polyhattrick/configuration.toml:
server = "https://api.polyhattrick.sesamemonster.de" # the polyhattrick server to use
POLYHATTRICK_SERVER overrides server for a single run.
Notes
- Made for Linux.
- The
polyhattrick login authenticateandlogin exchangecommands from version 0.1.0 still work.
Metadata
Release files for polyhattrick 0.5.0
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 |
|---|---|---|---|---|
| polyhattrick-0.5.0.tar.gz | 26.9 kB | With provenance | Details for polyhattrick-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polyhattrick-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for polyhattrick-0.5.0-py3-none-any.whl |
Total release size: 58.7 kB
Release files / polyhattrick-0.5.0.tar.gz
| Download URL | polyhattrick-0.5.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03913f6c63ccb2c3e4bf53f3dd7f91aa3c8172459042236f53215c0482c2c70c
|
|
BLAKE2b-256 checksum How to use checksums |
d44800de25ac724cacbbd957b42aa3123d08711a3bcac774ba6945bcbc10f762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / polyhattrick-0.5.0-py3-none-any.whl
| Download URL | polyhattrick-0.5.0-py3-none-any.whl |
|---|---|
| Size | 31.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6f9be4b94e5253374177c07c5ab0d3b9160ceb08b9aafbe115cbf80d6567876
|
|
BLAKE2b-256 checksum How to use checksums |
88a6a4bae35d4b08d0ecdf342194f65c2bc670eb57f07ac15867efcf2eb3c658
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for polyhattrick 0.5.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for polyhattrick-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA 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.