Skip to main content

Pokémon Set Formats

This is a package for interacting with the format used by Pokémon Showdown and PokéPaste. It's specific features are:

  • Parsing Pokémon Showdown and PokéPaste formats into a dictionary
  • Converting a dictionary into a Pokémon Showdown format
  • Uploading a text team to PokéPaste and returning the link
  • Retrieve a JSON team from PokéPaste

Installation

$ pip install pokemon_formats

Usage

Uploading a team to PokéPaste

from pokemon_formats import PokePaste
team = """Axew @ Aguav Berry
Ability: Rivalry
EVs: 248 HP / 252 Atk / 8 SpA
Naughty Nature
- Aqua Tail
- Crunch
- Dragon Claw
- Draco Meteor

Bagon @ Choice Band
Ability: Sheer Force
EVs: 252 Atk / 4 SpD / 252 Spe
Adamant Nature
- Body Slam
- Double-Edge
- Dragon Claw
- Dragon Dance

Bulbasaur @ Eviolite
Ability: Chlorophyll
EVs: 252 Atk / 4 SpA / 252 Spe
Lonely Nature
- Body Slam
- Curse
- Double-Edge
- Energy Ball
"""

url = PokePaste.createPokePaste(team)
print(url)

Retrieving a team from PokéPaste

from pokemon_formats import PokePaste

url = "https://pokepast.es/0840194f9282db1a"
pokepaste_json = PokePaste.retrieve_pokepaste(url)
print(pokepaste_json)

Convert a dictionary to a Pokémon Showdown format

from pokemon_formats import PokePaste
from pokemon_formats import Showdown

team = PokePaste.retrieve_pokepaste("https://pokepast.es/0840194f9282db1a")
showdown_format = Showdown.jsonToShowdown(team)
print(showdown_format)

Convert a Pokémon Showdown format to a dictionary

from pokemon_formats import PokePaste

team = """Axew @ Aguav Berry
Ability: Rivalry
EVs: 248 HP / 252 Atk / 8 SpA
Naughty Nature
- Aqua Tail
- Crunch
- Dragon Claw
- Draco Meteor

Bagon @ Choice Band
Ability: Sheer Force
EVs: 252 Atk / 4 SpD / 252 Spe
Adamant Nature
- Body Slam
- Double-Edge
- Dragon Claw
- Dragon Dance

Bulbasaur @ Eviolite
Ability: Chlorophyll
EVs: 252 Atk / 4 SpA / 252 Spe
Lonely Nature
- Body Slam
- Curse
- Double-Edge
- Energy Ball
"""

json_team = PokePaste.pokemon_from_paste(team)
print(json_team)

Metadata

Release files for pokemon-formats 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pokemon-formats 1.0.2
File Size Uploaded
pokemon_formats-1.0.2.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pokemon-formats 1.0.2
File Interpreter ABI Platform
pokemon_formats-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / pokemon_formats-1.0.2.tar.gz

Download URL pokemon_formats-1.0.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4cf90f97fe349970871ba98bb6457614fd8563ce63ce52bc7a8758c8b89aa779
BLAKE2b-256 checksum
How to use checksums
cdfa69ca32aa9f864f8956025b511488a4cabeb6650e19f5a0549e2f38d7476f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pokemon_formats-1.0.2-py3-none-any.whl

Download URL pokemon_formats-1.0.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d5774cee7ca3846aed39310763740f0e3bcdcde265a5a1eb9d73715a155986f
BLAKE2b-256 checksum
How to use checksums
00ff5b2c59f61bed731cfdf3f1ff83a41c61268184032d6ec4c791ed80f6d6b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page