Py-slippi is a Python parser for .slp game replay files for Super Smash Brothers Melee for the Nintendo GameCube. These replays are generated by Jas Laferriere’s Slippi recording code, which runs on a Wii or the Dolphin emulator.
Installation
Requires Python >= 3.7. To install, run the following command (optionally inside a virtual environment):
pip install py-slippi
API Docs
See the Module Index for detailed API docs, starting with slippi.game.
Usage
py-slippi supports both event-based and object-based parsing. Object-based parsing is generally easier, but event-based parsing is more efficient and supports reading partial or in-progress games.
Object-based parsing:
>>> from slippi import Game
>>> Game('test/replays/game.slp')
Game(
end=End(
lras_initiator=None,
method=Method.CONCLUSIVE),
frames=[...](5209),
metadata=Metadata(
console_name=None,
date=2018-06-22 07:52:59+00:00,
duration=5209,
platform=Platform.DOLPHIN,
players=(
Player(
characters={InGameCharacter.MARTH: 5209},
netplay_name=None),
Player(
characters={InGameCharacter.FOX: 5209},
netplay_name=None),
None,
None)),
start=Start(
is_frozen_ps=None,
is_pal=None,
is_teams=False,
players=(
Player(
character=CSSCharacter.MARTH,
costume=3,
stocks=4,
tag=,
team=None,
type=Type.HUMAN,
ucf=UCF(
dash_back=DashBack.OFF,
shield_drop=ShieldDrop.OFF)),
Player(
character=CSSCharacter.FOX,
costume=0,
stocks=4,
tag=,
team=None,
type=Type.CPU,
ucf=UCF(
dash_back=DashBack.OFF,
shield_drop=ShieldDrop.OFF)),
None,
None),
random_seed=3803194226,
slippi=Slippi(
version=1.0.0),
stage=Stage.YOSHIS_STORY))
Frame data is elided when you print games, but you can inspect a sample frame with e.g. game.frames[0].
Event-driven API:
>>> from slippi.parse import parse
>>> from slippi.parse import ParseEvent
>>> handlers = {ParseEvent.METADATA: print}
>>> parse('test/replays/game.slp', handlers)
Metadata(
console_name=None,
date=2018-06-22 07:52:59+00:00,
duration=5209,
platform=Platform.DOLPHIN,
players=(
Player(
characters={InGameCharacter.MARTH: 5209},
netplay_name=None),
Player(
characters={InGameCharacter.FOX: 5209},
netplay_name=None),
None,
None))
👉 You can pass a stream to parse, such as sys.stdin.buffer! This is useful for e.g. decompressing with gunzip, or reading from an in-progress replay via tail -c+1 -f.
Metadata
Release files for py-slippi 1.6.2
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 |
|---|---|---|---|---|
| py-slippi-1.6.2.tar.gz | 23.7 kB | Without provenance | Details for py-slippi-1.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_slippi-1.6.2-py3-none-any.whl | Python 3 | none | any | Details for py_slippi-1.6.2-py3-none-any.whl |
Total release size: 49.5 kB
Release files / py-slippi-1.6.2.tar.gz
| Download URL | py-slippi-1.6.2.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50bbd46c009e4441096167af926010ce3059103ddc9c48a54552591fa17c1983
|
|
BLAKE2b-256 checksum How to use checksums |
8569f5a2d058beafcd7267bbd35a30832896b87c71a2541f61c91765083256a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / py_slippi-1.6.2-py3-none-any.whl
| Download URL | py_slippi-1.6.2-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ee9e159d865eea87ea47811fc1bc06d52239dd43adcfcd4f4aa667ca6119266
|
|
BLAKE2b-256 checksum How to use checksums |
7ae5dac9f0e6072326642b1b20d377a7f6c717c84b745db20dd56d67abde2d28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for py-slippi 1.6.2
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.