Skip to content

betting_combat.providers.cito.models

models.py — Cito’s payloads as typed vendor rows: snake_case, values parsed (“20 of 47” → landed / attempted, “1:23” → seconds), times aware UTC. Cito’s own vocabulary is kept (its method words, its corners); turning it into ours is the feeds’.

Event a card (``/ufc/events``, ``/upcoming``, ``/recent``, ``/{slug}``)
CardFighter one corner of a bout (``fighters[]``): slug, Cito id, outcome, profile
Referee the bout's referee (2024+)
StatLine one fighter's official line, a round's or the fight's (``roundStats[]``,
``boutStats[]``, ``/bouts/{id}/rounds``)
Bout a bout (``/events/{slug}/bouts``, ``/bouts``, ``/bouts/{id}``)
OddsOutcome one outcome's price at one book (``/bouts/{id}/odds``)
OddsTick one prediction-market price change (``/bouts/{id}/odds/history``)
Fighter a fighter (``/fighters``, ``/fighters/{slug}``)
CareerFight one fight of a fighter's pro career (``/fighters/{slug}/career``)
Career the career: records and fights
Ranking one fighter's place on a board (``/rankings``, ``/rankings/media``)
FighterRates a fighter's career rates TODAY (``/fighters/{slug}/stats``): never as of a past date
FighterFight one fight on a fighter's UFC list (``/fighters/{slug}/fights``)
Search fighters, events and bouts matching a query (``/ufc/search``, ``/mma/search``)
MmaBout one bout of another promotion (``/mma/bouts``: PRIDE, WEC, Strikeforce,
Bellator, … with official stats where kept)
MmaEvent one card of another promotion (``/mma/events``)
LiveLine one fighter's running line in one round (a snapshot's ``roundStats``)
LiveTotals one fighter's running fight totals (``liveStats``)
LiveState a live reading of a bout (``/live/{id}``, ``/state``, an SSE snapshot)
Snapshot one hash-diffed snapshot (``/live/{id}/snapshots``)
LiveEvent a card the live worker tracks (``/live``'s ``events``, ``/live/events``)
LiveBoard ``/live``: the bouts live now, what is next, the tracked cards
of_pair · clock_s · as_date the parsers

Classes

Bout

Bases: _Row

One bout. Its ids: id (today’s card id: a UFCStats hex hash, a FightMetric number, a uuid or a slug, and it changed after some cards), data_id (the FightMetric number: stable), live_bout_id (the only id /snapshots answers to).

corner

corner(side: str) -> CardFighter | None

CardFighter

Bases: _Row

One corner of a bout. fighter_id is Cito’s fighter uuid.

Career

Bases: _Row

A fighter’s pro career. Check listed_matches_official before trusting the list is whole (outside_ufc_history is set even when no outside fight is listed).

CareerFight

Bases: _Row

One fight of a pro career, inside the UFC or not. bout_id is the UFCStats hex on UFC fights; opponents outside the UFC often have no slug.

Event

Bases: _Row

One card. starts_at is the first fight (UTC); event_date New York’s date, one day early on 1994-2023 archive cards (join it ±1 day).

Fighter

Bases: _Row

One fighter. age, division, the record and the rank are TODAY’s: never read them into the past. Cito has no birth date.

FighterFight

Bases: _Row

One fight on a fighter’s UFC list: the corner, the outcome, the opponent, the card and the bout (results as the bout carries them).

FighterRates

Bases: _Row

A fighter’s career rates as Cito computes them TODAY (Royce Gracie’s wins by method are all 0): for display and checks, never a feature as of a past date.

LiveBoard

Bases: _Row

/ufc/live: the bouts live now, what is next, the tracked cards.

LiveEvent

Bases: _Row

A card the live worker tracks: its bouts’ FightMetric numbers in running order and the one live now. A bout missing from chrono_fmids gets no live feed.

LiveLine

Bases: _Row

One fighter’s running line in one round, as a snapshot had it (±3-4 sig strikes of the official line, corrected later).

LiveState

Bases: _Live

A live reading of a bout: the clock and the running totals, no per-round lines.

LiveTotals

Bases: _Row

One fighter’s running fight totals. fighter_id is the FightMetric fighter number.

MmaBout

Bases: _Row

One bout of another promotion: the result and, where kept, official totals.

MmaEvent

Bases: _Row

OddsOutcome

Bases: _Row

One outcome’s price at one book, as Cito last saw it (a snapshot, not a series).

OddsTick

Bases: _Row

One prediction-market price change (Cito’s direct Polymarket feed, from 2026-11-04). in_play carries the live tracker’s round and clock (up to ~10 s stale), null pre-fight.

Ranking

Bases: _Row

One fighter’s place on a board today (system: meta | media). rank None with rank_text ‘C’ is the champion.

Referee

Bases: _Row

Bases: _Row

Snapshot

Bases: _Live

One hash-diffed snapshot: the reading plus every round’s running line per corner.

StatLine

Bases: _Row

One fighter’s official line: one round’s (round set) or the whole fight’s.

Functions

as_date

as_date(value: Any) -> Any

‘2026-10-24’ or an ISO timestamp → its date part; blank → None.

clock_s

clock_s(value: Any) -> int | None

‘4:54’ → 294; a number passes; blank or unreadable → None.

of_pair

of_pair(value: Any) -> tuple[int | None, int | None]

‘20 of 47’ → (20, 47); blank or unreadable → (None, None).