Public API
High-level helpers exposed from import gem. The implementation lives in gem.api; gem.__init__ re-exports this supported package surface.
Generated API
Module gem.api
High-level public API for Dota 2 Source 2 replay parsing.
Source: src/gem/api.py
Top-level functions
parse
def parse(path: str | Path) -> ParsedMatchParse a Dota 2 replay file and return structured match data.
Source: src/gem/api.py:130
find_player
def find_player(match: ParsedMatch, hero: str) -> ParsedPlayer | NoneLook up a player by hero name.
Source: src/gem/api.py:214
to_dict
def to_dict(match: ParsedMatch) -> dict[str, Any]Convert a :class:ParsedMatch to a JSON-serializable dictionary.
Source: src/gem/api.py:245
to_json
def to_json(match: ParsedMatch, *, indent: int | None = None, sort_keys: bool = False) -> strSerialize a :class:ParsedMatch to a JSON string.
Source: src/gem/api.py:250
parse_to_json
def parse_to_json(path: str | Path, *, indent: int | None = None, sort_keys: bool = False) -> strParse a replay and return the result as JSON.
Source: src/gem/api.py:255
parse_to_dataframe
def parse_to_dataframe(path: str | Path) -> dict[str, pd.DataFrame]Parse a replay and return tabular projections as pandas DataFrames.
Source: src/gem/api.py:260
to_parquet
def to_parquet(match: ParsedMatch, output_dir: str | Path, *, index: bool = False) -> list[Path]Export DataFrame projections for a parsed match to parquet files.
Source: src/gem/api.py:282
parse_to_parquet
def parse_to_parquet(path: str | Path, output_dir: str | Path, *, index: bool = False) -> list[Path]Parse a replay and export DataFrame projections to parquet files.
Source: src/gem/api.py:313