A production-grade Python interview practice platform with 82 problems focused on real-world Python skills, not algorithms.
Not another LeetCode clone. This platform focuses on:
- β Python-specific features (Type Hints, Decorators, Context Managers)
- β Standard library mastery (functools, itertools, collections)
- β Production patterns (Pydantic, pytest, async/await)
- β Real-world scenarios (log parsing, config validation, API rate limiting)
No algorithm grinding. Use LeetCode for that. This is for Python mastery.
Easy way (recommended):
./scripts/dev.sh
# Automatically starts both backend and frontend
# Open http://localhost:5173Manual way (two terminals):
# Terminal 1: Start backend
cd server
uvicorn main:app --reload
# Terminal 2: Start frontend
cd ui
npm run dev
# Open http://localhost:5173- Click any problem in the sidebar
- Write your solution in the Monaco editor
- Run tests to get instant feedback
- Get hints for failing tests
- Move to the next problem
- Functools - partial, lru_cache, singledispatch, reduce
- Itertools - groupby, combinations, chain, accumulate
- Generators & Coroutines - yield, send, async patterns
- Type Hints - TypedDict, Protocols, Generics
- Decorators - retry logic, memoization, validation
- Testing - pytest fixtures, mocking, parametrize
- Collections - Counter, defaultdict, ChainMap
- Context Managers - custom contexts, contextlib
- Async/Await - asyncio, concurrent patterns
- File I/O - JSON/CSV parsing, log processing
- Pattern Matching - structural pattern matching
- ABC & Enums - abstract base classes, enumerations
- And more...
- Search by problem name
- Filter by difficulty (Easy, Medium, Hard)
- Filter by categories (multiple selection)
- Real-time filter updates
- Monaco Editor (VS Code editor)
- Python syntax highlighting
- Auto-completion
- Minimap navigation
- Public tests (visible before solving)
- Hidden tests (revealed after passing)
- Detailed error messages
- Helpful hints for debugging
- Dark theme optimized for coding
- Syntax highlighting for example code blocks
- Clickable category badges for quick filtering
- Semantic markdown headers for better structure
- Resizable editor/problem panels
- Progress tracking with URL-based state
- docs/ADDING_PROBLEMS.md - Complete guide to adding problems
- docs/PROBLEM_TEMPLATE.py - Copy-paste template
- docs/CATEGORIES.md - Category reference
See documentation above for:
- Problem structure and patterns
- Category guidelines
- Test case best practices
- Using Claude/Codex to generate problems
- FastAPI - Modern Python web framework
- Python 3.11+ - Type hints, pattern matching
- uvicorn - ASGI server
- React + TypeScript
- Vite - Fast builds
- Monaco Editor - VS Code editor component
Current: 82 problems β Goal: 100+ problems
- Functools (partial, lru_cache, singledispatch)
- Itertools (groupby, combinations, chain)
- Generators & Coroutines
- pytest fixtures & mocking
- Type hints & Protocols
- Pattern matching
- ABC & Enums
- Pydantic advanced validation
- More async/await patterns
- subprocess management
- Regular expressions
- Dataclasses advanced features
Option 1: Ask Claude (me!)
I need 10 problems for [categories].
See docs/ADDING_PROBLEMS.md for structure.
Generate complete Python code for python_advanced_problems.py
Option 2: Use Codex/Copilot
# Open problems/python_advanced_problems.py
# Add comment describing what you want
# Let Copilot generate the code
# Review and adjustOption 3: Manual
- Copy
docs/PROBLEM_TEMPLATE.py - Fill in placeholders
- Add to
problems/python_advanced_problems.py - Update
NEW_PROBLEMSlist - Test in UI
Type System: Type Hints, TypedDict, Protocols, Generics, Literal, Union Types Decorators: Decorators, functools, Closures Context: Context Managers, contextlib Collections: Counter, defaultdict, deque, ChainMap, namedtuple Iteration: Generators, Iterators, itertools, Comprehensions Validation: Pydantic, Data Classes Async: Async/Await, asyncio, Threading, concurrent.futures I/O: File I/O, pathlib, JSON, CSV, Logging Testing: pytest, Mocking, Fixtures Other: Error Handling, Datetime, Regular Expressions, subprocess
Algorithms, Graph Algorithms, Binary Search, Dynamic Programming, etc.
- Read the docs - See ADDING_PROBLEMS.md
- Use the template - Copy PROBLEM_TEMPLATE.py
- Follow categories - Reference CATEGORIES.md
- Test thoroughly - Run in UI before committing
- Focus on Python - Real-world, production-realistic scenarios
- Realistic production scenario
- Comprehensive docstring
- 3-4 test cases (at least 1 hidden)
- Helpful hints in failing tests
- Python-specific categories
- Proper difficulty level
- Works in UI
def _build_retry_decorator_problem() -> Problem:
"""Retry decorator with exponential backoff."""
starter_code = (
"from functools import wraps\n\n"
"def retry(max_attempts=3, backoff_factor=2.0):\n"
" \"\"\"Decorator that retries on failure.\"\"\"\n"
" raise NotImplementedError\n"
)
def run_tests(solution_module):
# Test 1: Succeeds first try
# Test 2: Retries and succeeds
# Test 3: Exhausts retries
# Test 4: Exponential backoff timing
...
return Problem(
slug="retry_decorator",
title="Retry Decorator with Exponential Backoff",
difficulty="medium",
description="Network calls fail. Build retry logic...",
categories=["Decorators", "Error Handling", "functools"]
)interview-prep/
βββ server/ # FastAPI backend
β βββ main.py # API endpoints
βββ ui/ # React frontend
β βββ src/
β βββ App.tsx # Main component with filters
β βββ api.ts # API client
βββ problems/ # Problem definitions
β βββ problem_bank.py # Core problems
β βββ python_advanced_problems.py # New Python problems
βββ docs/ # Documentation
β βββ ADDING_PROBLEMS.md # How to add problems
β βββ PROBLEM_TEMPLATE.py # Template
β βββ CATEGORIES.md # Category reference
βββ README.md # This file
cd server
pytestcd ui
npm test- Start both servers
- Open http://localhost:5173
- Try solving a problem
- Verify tests run correctly
- Check filtering works
# Check Python version
python3 --version # Need 3.11+
# Install dependencies
pip install -r requirements.txt# Check Node version
node --version # Need 16+
# Install dependencies
npm install# Restart backend - categories are auto-discovered
cd server
uvicorn main:app --reload- Check it's in
NEW_PROBLEMSlist - Restart backend
- Clear browser cache
- Check browser console for errors
- Read the full problem description
- Check the function signature carefully
- Use the hints when tests fail
- Test edge cases yourself
- Ask for help if stuck
- Focus on production scenarios
- Include realistic data
- Write comprehensive tests
- Provide helpful hints
- Use Python-specific categories
- Type Hints: PEP 484, mypy docs
- Async: asyncio docs
- Testing: pytest docs
- Pydantic: pydantic docs
- Collections: collections docs
- itertools: itertools docs
- Build filtering UI (search, categories, difficulty)
- Create 12 high-quality problems
- Write comprehensive documentation
- Reach 25-30 problems
- Add Pydantic problems
- Add async/await problems
- Add pytest/mocking problems
- Reach 100+ problems
Built with:
- FastAPI - Backend framework
- React - Frontend library
- Monaco Editor - Code editor
- Vite - Build tool
Ready to add problems? Start with docs/ADDING_PROBLEMS.md
Need help? Ask Claude or use the problem template!