Skip to main content

A parser and downloader for Pokémon VGC tournament data from rk9.gg

Project description

Data-Pokemon-VGC

A Python package to download and parse Pokémon VGC tournament data from rk9.gg, including players, pairings, and team details.

Features

  • Download tournament data by tournament code
  • Extract players and their teams with detailed Pokémon info
  • Save data as JSON files in a structured format
  • Command-line interface for easy usage

Installation

pip install Data-Pokemon-VGC

Or clone the repo and install locally:

git clone https://github.com/Rxdsilver/Data-Pokemon-VGC.git
cd Data-Pokemon-VGC
pip install .

Usage

Run this script to download tournament:

python -m scripts.download_tournament 'RK9_Code'

Run this script to get usage:

python -m scripts.compute_usage 'RK9_Code'

This will download tournament info, players, pairings, and teams, and save JSON files in the data/ directory named with the tournament code.

Project Structure

├── scripts/
   └── download_tournament.py   # Main entry point CLI script
├── tournament_parser/
   ├── models.py                # Data classes for Tournament, Player, Team, etc.
   ├── parser.py                # Parsing logic from HTML pages
   ├── utils.py                 # Helper functions (e.g. URL builders)
   └── save.py                  # Functions to save JSON data
├── data/                       # Output JSON files saved here
├── tests/                      # Unit tests

Development & Tests

  • Python 3.11+
  • Use pytest to run tests

Continuous Integration

This project uses GitHub Actions for automated bumping version and publishing to PyPI. On every push and pull request, the workflow check commit name to trigger action or not.

Example:

git commit -m "<some change> bump: patch" # 0.1.2 -> 0.1.3
git commit -m "<some change> bump: minor" # 0.1.2 -> 0.2.0
git commit -m "<some change> bump: major" # 0.1.2 -> 1.0.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

data_pokemon_vgc-0.2.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

data_pokemon_vgc-0.2.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file data_pokemon_vgc-0.2.1.tar.gz.

File metadata

  • Download URL: data_pokemon_vgc-0.2.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for data_pokemon_vgc-0.2.1.tar.gz
Algorithm Hash digest
SHA256 272e70c602f925fdb369dc7da090f5e3eba25e894d618a5374eb50a7816f4f73
MD5 7452f9310c12d42afdd08193fd7134d4
BLAKE2b-256 dc51a516c7e8ae6652f220a9a1a60c8f226c5be4ef21fa851c7cf01038415108

See more details on using hashes here.

File details

Details for the file data_pokemon_vgc-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for data_pokemon_vgc-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4303fb0e2822f265e16a74d3424911c33bf9b0f45ee265fa2cae043bea135e7b
MD5 8d15a98b66177bcdc4850748dc9742a7
BLAKE2b-256 a45befde675302d75707156070fa48398a3ca43442768340eac32dd06e82d253

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page