Skip to content

conglb/pokemon-look-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PokéPipeline

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.

Solution in Detail

ETL

Etract
Call API: 
- https://pokeapi.co/api/v2/pokemon/{pid} 
- (where {pid} is the Pokédex ID)
Response: JSON format
Transform

Transformed data includes:

ability_id: cut from ability_URL
type_id: cut from move_URL
Loading
Pokemon table
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
Type table: list of types of Pokemon
id INTEGER PRIMARY KEY AUTOINCREMENT
name TEXT UNIQUE — type name (e.g., grass, fire)
Abilities table: list all abilities
id INTEGER PRIMARY KEY AUTOINCREMENT
name TEXT UNIQUE — ability name (e.g., overgrow)
Pokemon_Abilities table: many-to-many link
pokemon_id INTEGER REFERENCES pokemon(id) (primary key part)
ability_id INTEGER REFERENCES abilities(id) (primary key part)
Pokemon_Types table: many-to-many link
pokemon_id INTEGER REFERENCES pokemon(id) (primary key part)
type_id INTEGER REFERENCES types(id) (primary key part)

Run:

Run locally:

pip install -r requirements.txt
python pipeline.py

With Docker (builds, runs ETL and starts the server):

docker-compose up --build

Open http://localhost:8000 in your browser.

Files:

  • pipeline.py — runs ETL then starts the server
  • app/ — FastAPI app, models and static frontend
  • pokemon.db — created after running the pipeline (SQLite)
  • Dockerfile, docker-compose.yml `

About

nothing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors