PokeExplorer is a Python exam project that allows users to explore Pokemon data through a web application.
The project uses a Streamlit frontend and a FastAPI backend. The backend fetches Pokemon data from PokeAPI, structures the data with Pydantic, performs statistics with Pandas and NumPy, and exposes API endpoints for the frontend. The application also includes an AI page where users can ask questions about a Pokemon using the OpenAI API.
Before running the project, make sure you have installed:
- Python 3.11 or 3.12
- Docker Desktop
- Git
- Clone the project:
git clone <repository-url>
cd <project-folder>-
Create a .env file in the project root. Use .env.example as a template
-
Start the project with Docker Compose:
docker compose up --build- Stop the project with Docker Compose:
docker compose down- Create and activate a virtual environment:
python -m venv .venv- Start the virtual enviroment:
.\.venv\Scripts\Activate.ps1- Install dependencies:
python -m pip install -r backend/requirements.txt
python -m pip install -r frontend/requirements.txt
python -m pip install -r requirements-dev.txt- Start the backend:
cd backend
python -m uvicorn app.main:app --reload --port 8001- Start the frontend in another terminal:
cd frontend
python -m streamlit run app.py- Run all tests and checks:
uv run pre-commit run --all-files- Or run them individually:
uv run pytest
uv run ruff check .
uv run ruff format .
uv run pyright- Search for a Pokemon by name
- View Pokemon types, abilities, height, weight and base stats
- Compare multiple Pokemon visually
- Show statistics based on selected Pokemon
- Visualize data with Matplotlib
- Ask AI questions about a selected Pokemon
- Run tests and code quality checks
- Start the full application with Docker Compose
GET /health GET /api/pokemon/{name} GET /api/pokemon/compare?names=pikachu,charizard GET /api/stats/summary?names=pikachu,charizard,bulbasaur POST /api/ai/ask
- Streamlit
- Requests
- Pandas
- Matplotlib
- FastAPI
- Pydantic
- HTTPX
- PokeAPI
- OpenAI API
- Python-dotenv
- Pandas
- NumPy
- Matplotlib
- pytest
- Ruff
- Pyright
- pre-commit
- uv
- Docker
- Docker Compose