peppi_py package

Submodules

peppi_py.frame module

class peppi_py.frame.Data(pre: peppi_py.frame.Pre, post: peppi_py.frame.Post)

Bases: object

post: Post
pre: Pre
class peppi_py.frame.End(latest_finalized_frame: pyarrow.lib.Int32Array | None = None)

Bases: object

latest_finalized_frame: Int32Array | None
class peppi_py.frame.Frame(id: object, ports: tuple[peppi_py.frame.PortData])

Bases: object

id: object
ports: tuple[PortData]
class peppi_py.frame.Item(type: pyarrow.lib.UInt16Array, state: pyarrow.lib.UInt8Array, direction: pyarrow.lib.FloatArray, velocity: peppi_py.frame.Velocity, position: peppi_py.frame.Position, damage: pyarrow.lib.UInt16Array, timer: pyarrow.lib.FloatArray, id: pyarrow.lib.UInt32Array, misc: tuple[pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array] | None = None, owner: pyarrow.lib.Int8Array | None = None)

Bases: object

damage: UInt16Array
direction: FloatArray
id: UInt32Array
misc: tuple[UInt8Array, UInt8Array, UInt8Array, UInt8Array] | None
owner: Int8Array | None
position: Position
state: UInt8Array
timer: FloatArray
type: UInt16Array
velocity: Velocity
class peppi_py.frame.PortData(leader: peppi_py.frame.Data, follower: peppi_py.frame.Data | None = None)

Bases: object

follower: Data | None
leader: Data
class peppi_py.frame.Position(x: pyarrow.lib.FloatArray, y: pyarrow.lib.FloatArray)

Bases: object

x: FloatArray
y: FloatArray
class peppi_py.frame.Post(character: pyarrow.lib.UInt8Array, state: pyarrow.lib.UInt16Array, position: peppi_py.frame.Position, direction: pyarrow.lib.FloatArray, percent: pyarrow.lib.FloatArray, shield: pyarrow.lib.FloatArray, last_attack_landed: pyarrow.lib.UInt8Array, combo_count: pyarrow.lib.UInt8Array, last_hit_by: pyarrow.lib.UInt8Array, stocks: pyarrow.lib.UInt8Array, state_age: pyarrow.lib.FloatArray | None = None, state_flags: tuple[pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array, pyarrow.lib.UInt8Array] | None = None, misc_as: pyarrow.lib.FloatArray | None = None, airborne: pyarrow.lib.UInt8Array | None = None, ground: pyarrow.lib.UInt16Array | None = None, jumps: pyarrow.lib.UInt8Array | None = None, l_cancel: pyarrow.lib.UInt8Array | None = None, hurtbox_state: pyarrow.lib.UInt8Array | None = None, velocities: peppi_py.frame.Velocities | None = None, hitlag: pyarrow.lib.FloatArray | None = None, animation_index: pyarrow.lib.UInt32Array | None = None)

Bases: object

airborne: UInt8Array | None
animation_index: UInt32Array | None
character: UInt8Array
combo_count: UInt8Array
direction: FloatArray
ground: UInt16Array | None
hitlag: FloatArray | None
hurtbox_state: UInt8Array | None
jumps: UInt8Array | None
l_cancel: UInt8Array | None
last_attack_landed: UInt8Array
last_hit_by: UInt8Array
misc_as: FloatArray | None
percent: FloatArray
position: Position
shield: FloatArray
state: UInt16Array
state_age: FloatArray | None
state_flags: tuple[UInt8Array, UInt8Array, UInt8Array, UInt8Array, UInt8Array] | None
stocks: UInt8Array
velocities: Velocities | None
class peppi_py.frame.Pre(random_seed: pyarrow.lib.UInt32Array, state: pyarrow.lib.UInt16Array, position: peppi_py.frame.Position, direction: pyarrow.lib.FloatArray, joystick: peppi_py.frame.Position, cstick: peppi_py.frame.Position, triggers: pyarrow.lib.FloatArray, buttons: pyarrow.lib.UInt32Array, buttons_physical: pyarrow.lib.UInt16Array, triggers_physical: peppi_py.frame.TriggersPhysical, raw_analog_x: pyarrow.lib.Int8Array | None = None, percent: pyarrow.lib.FloatArray | None = None, raw_analog_y: pyarrow.lib.Int8Array | None = None)

Bases: object

buttons: UInt32Array
buttons_physical: UInt16Array
cstick: Position
direction: FloatArray
joystick: Position
percent: FloatArray | None
position: Position
random_seed: UInt32Array
raw_analog_x: Int8Array | None
raw_analog_y: Int8Array | None
state: UInt16Array
triggers: FloatArray
triggers_physical: TriggersPhysical
class peppi_py.frame.Start(random_seed: pyarrow.lib.UInt32Array, scene_frame_counter: pyarrow.lib.UInt32Array | None = None)

Bases: object

random_seed: UInt32Array
scene_frame_counter: UInt32Array | None
class peppi_py.frame.TriggersPhysical(l: pyarrow.lib.FloatArray, r: pyarrow.lib.FloatArray)

Bases: object

l: FloatArray
r: FloatArray
class peppi_py.frame.Velocities(self_x_air: pyarrow.lib.FloatArray, self_y: pyarrow.lib.FloatArray, knockback_x: pyarrow.lib.FloatArray, knockback_y: pyarrow.lib.FloatArray, self_x_ground: pyarrow.lib.FloatArray)

Bases: object

knockback_x: FloatArray
knockback_y: FloatArray
self_x_air: FloatArray
self_x_ground: FloatArray
self_y: FloatArray
class peppi_py.frame.Velocity(x: pyarrow.lib.FloatArray, y: pyarrow.lib.FloatArray)

Bases: object

x: FloatArray
y: FloatArray

peppi_py.game module

class peppi_py.game.DashBack(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

ARDUINO = 2
UCF = 1
class peppi_py.game.End(method: peppi_py.game.EndMethod, lras_initiator: peppi_py.game.Port | None = None, players: tuple[peppi_py.game.PlayerEnd, ...] | None = None)

Bases: object

lras_initiator: Port | None
method: EndMethod
players: tuple[PlayerEnd, ...] | None
class peppi_py.game.EndMethod(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

GAME = 2
NO_CONTEST = 7
RESOLVED = 3
TIME = 1
UNRESOLVED = 0
class peppi_py.game.Game(start: peppi_py.game.Start, end: peppi_py.game.End, metadata: dict, frames: peppi_py.frame.Frame | None)

Bases: object

end: End
frames: Frame | None
metadata: dict
start: Start
class peppi_py.game.Language(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

ENGLISH = 1
JAPANESE = 0
class peppi_py.game.Match(id: str, game: int, tiebreaker: int)

Bases: object

game: int
id: str
tiebreaker: int
class peppi_py.game.Netplay(name: str, code: str, suid: str | None = None)

Bases: object

code: str
name: str
suid: str | None
class peppi_py.game.Player(port: peppi_py.game.Port, character: int, type: peppi_py.game.PlayerType, stocks: int, costume: int, team: peppi_py.game.Team | None, handicap: int, bitfield: int, cpu_level: int | None, offense_ratio: float, defense_ratio: float, model_scale: float, ucf: peppi_py.game.Ucf | None = None, name_tag: str | None = None, netplay: peppi_py.game.Netplay | None = None)

Bases: object

bitfield: int
character: int
costume: int
cpu_level: int | None
defense_ratio: float
handicap: int
model_scale: float
name_tag: str | None
netplay: Netplay | None
offense_ratio: float
port: Port
stocks: int
team: Team | None
type: PlayerType
ucf: Ucf | None
class peppi_py.game.PlayerEnd(port: peppi_py.game.Port, placement: int)

Bases: object

placement: int
port: Port
class peppi_py.game.PlayerType(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

CPU = 1
DEMO = 2
HUMAN = 0
class peppi_py.game.Port(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

P1 = 0
P2 = 1
P3 = 2
P4 = 3
class peppi_py.game.Scene(major: int, minor: int)

Bases: object

major: int
minor: int
class peppi_py.game.ShieldDrop(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

ARDUINO = 2
UCF = 1
class peppi_py.game.Slippi(version: tuple[int, int, int])

Bases: object

version: tuple[int, int, int]
class peppi_py.game.Start(slippi: peppi_py.game.Slippi, bitfield: tuple[int, int, int, int], is_raining_bombs: bool, is_teams: bool, item_spawn_frequency: int, self_destruct_score: int, stage: int, timer: int, item_spawn_bitfield: tuple[int, int, int, int, int], damage_ratio: float, players: tuple[peppi_py.game.Player, ...], random_seed: int, is_pal: bool | None = None, is_frozen_ps: bool | None = None, scene: peppi_py.game.Scene | None = None, language: peppi_py.game.Language | None = None, match: peppi_py.game.Match | None = None)

Bases: object

bitfield: tuple[int, int, int, int]
damage_ratio: float
is_frozen_ps: bool | None
is_pal: bool | None
is_raining_bombs: bool
is_teams: bool
item_spawn_bitfield: tuple[int, int, int, int, int]
item_spawn_frequency: int
language: Language | None
match: Match | None
players: tuple[Player, ...]
random_seed: int
scene: Scene | None
self_destruct_score: int
slippi: Slippi
stage: int
timer: int
class peppi_py.game.Team(color: int, shade: int)

Bases: object

color: int
shade: int
class peppi_py.game.Ucf(dash_back: peppi_py.game.DashBack | None, shield_drop: peppi_py.game.ShieldDrop | None)

Bases: object

dash_back: DashBack | None
shield_drop: ShieldDrop | None

peppi_py.parse module

peppi_py.parse.arr_field(arr, dc_field)
peppi_py.parse.dc_from_json(cls, json)
peppi_py.parse.dc_from_sa(cls, arr)
peppi_py.parse.field_from_json(cls, json)
peppi_py.parse.field_from_sa(cls, arr)
peppi_py.parse.frames_from_sa(arrow_frames)
peppi_py.parse.tuple_from_json(cls, json)
peppi_py.parse.tuple_from_sa(cls, arr)
peppi_py.parse.unwrap_union(cls)

peppi_py.util module

Module contents

peppi_py.read_peppi(path: str, skip_frames: bool = False) Game
peppi_py.read_slippi(path: str, skip_frames: bool = False) Game