Pokémon Showdown! Replays
Usage
To create a replay you will need a log file produced by a Pokémon Showdown! server.
Installation
pip install pokemon_showdown_replays
Creating replay.pokemonshowdown.com replays
from pokemon_showdown_replays import Replay, Upload
replay_object = Replay.create_replay_object(log, show_full_damage = False, client_location = "https://play.pokemonshowdown.com)
html = Upload.create_replay(replay_object)
Creating play.pokemonshowdown.com download replays
from pokemon_showdown_replays import Replay, Download
replay_object = Replay.create_replay_object(log, show_full_damage = False, replay_embed_location = "https://play.pokemonshowdown.com/js/replay-embed.js")
html = Download.create_replay(replay_object)
The show_full_damage parameter is optional and defaults to False. When it is True and the log produced by the Pokémon Showdown! server has health shown in
full (ie. 347/550 and not 64/100), the replay will show the exact damage dealt by a move and the exact percentage of health a pokemon has left.
For example:
347 / 550 will be shown as 63.1% hp when it is enabled and 64% hp when it is disabled. It will also be 64/100 in the replay's log.
replay_embed_location can be used to show pokemon that do not exist on play.pokemonshowdown.com in a replay. This works by using the replay embed from the custom
client in which the pokemon has a sprite, allowing it to be shown in the replay.
client_location works in the same way but uses the whole client instead of just the replay embed.
Metadata
Release files for pokemon-showdown-replays 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pokemon_showdown_replays-0.1.1.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pokemon_showdown_replays-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / pokemon_showdown_replays-0.1.1.tar.gz
| Download URL | pokemon_showdown_replays-0.1.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7e75703b7f8baeb94604713fce4681aef4aee36011707ff3df682442942bca3
|
|
BLAKE2b-256 checksum How to use checksums |
aeaae0684021a3ada3991bada818e4cabec8a9892019b4ca4e7438d5e7babe8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.8 Linux/5.10.151-1-MANJARO
|
Release files / pokemon_showdown_replays-0.1.1-py3-none-any.whl
| Download URL | pokemon_showdown_replays-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea8273d5bedfebeebafd649305cb6823733ea1a7690ce28032d23317f250a70e
|
|
BLAKE2b-256 checksum How to use checksums |
7d131c9e8a1eca676e265ce3f9e28d68ef38e92df5a54a8e1ae85ea2eb9fa0ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.8 Linux/5.10.151-1-MANJARO
|