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.2.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.2-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: data_pokemon_vgc-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d998aad3da01a349eb9e202ebd51833f92eef0a193bbc53829a5e01335fe2bc2
MD5 f22a384dce82defb0ca988a856fe348d
BLAKE2b-256 649795f584c67688994ebcc784a631dae6b9b58cfa6473de3de0e075c328074e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for data_pokemon_vgc-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 672110a91fc7fd7dfb633e06ad1aa0b84b52e55e5a3bfcc75c3c2bcc7f1257ff
MD5 80a1f186731a95aeab3e22f307597a26
BLAKE2b-256 854884c1e71fcebe2358422736a5c3b5ebcc28569fb4445b5363bed0984608eb

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