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'

Run this script to get player's teams:

python -m scripts.export_player_teams "Hippolyte Bernard [FR]"

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: data_pokemon_vgc-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 60361cba77586f7ef9c34f5e1d5c338ecd87c920a3adda586f0cf651212af186
MD5 2c74b2ce57ecace1749a191a3ee47729
BLAKE2b-256 b12eda6c578fe34dd4c180f9d81fd0ee2e233a4acb338128afebaa0abee77ec6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for data_pokemon_vgc-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 617afcc3dd8dcfadb0456161fff5237c3cc98742ae7d91f148e724107af06264
MD5 04a98fde7ce679b7ccd3af499d9f2b4b
BLAKE2b-256 e6cfaf7e79af7037bc20873318cbd9d5530b6cdc2d6d8fb35ff399d00c1f7801

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