PokéPipeline is a small ETL + API project for the Aventa coding challenge.
It extracts Pokémon data (IDs 1–20) from the public PokeAPI, normalizes the nested JSON into a relational schema using SQLAlchemy and SQLite, and exposes the transformed data via a FastAPI server. A minimal frontend fetches the API and displays Pokémon cards.
Call API:
- https://pokeapi.co/api/v2/pokemon/{pid}
- (where {pid} is the Pokédex ID)
Response: JSON format
Transformed data includes:
ability_id: cut from ability_URL
type_id: cut from move_URL
id INTEGER PRIMARY KEY — Pokédex ID (1..)
name TEXT UNIQUE — Pokémon name (e.g., bulbasaur)
base_experience INTEGER — base experience value
height INTEGER — height (API units)
weight INTEGER — weight (API units)
image_url TEXT — artwork URL
id INTEGER PRIMARY KEY AUTOINCREMENT
name TEXT UNIQUE — type name (e.g., grass, fire)
id INTEGER PRIMARY KEY AUTOINCREMENT
name TEXT UNIQUE — ability name (e.g., overgrow)
pokemon_id INTEGER REFERENCES pokemon(id) (primary key part)
ability_id INTEGER REFERENCES abilities(id) (primary key part)
pokemon_id INTEGER REFERENCES pokemon(id) (primary key part)
type_id INTEGER REFERENCES types(id) (primary key part)
Run locally:
pip install -r requirements.txt
python pipeline.pyWith Docker (builds, runs ETL and starts the server):
docker-compose up --buildOpen http://localhost:8000 in your browser.
Files:
pipeline.py— runs ETL then starts the serverapp/— FastAPI app, models and static frontendpokemon.db— created after running the pipeline (SQLite)Dockerfile,docker-compose.yml`