βββββββ βββ βββββββ ββββ ββββββ βββββββββββββββββ
ββββββββββββ βββββββββ ββββββββββββββββββββββββββββββ
ββββββββ βββββββ βββββββββββββββββββββββββββ βββ
βββββββ βββββ βββββββββββββββββββββββββββ βββ
βββ βββ βββ βββ ββββββ βββββββββββ βββ
βββ βββ βββ ββββββ βββββββββββ βββ
An interactive Python learning platform with adaptive challenges, real-time feedback, and progress tracking
- π§ Adaptive Assessment - Smart quiz system that adjusts difficulty based on your performance
- π― Interactive Challenges - Hands-on coding exercises across multiple modules
- π Real-time Analysis - Instant feedback on syntax, PEP8 compliance, and performance
- π Achievement System - Earn badges for milestones and accomplishments
- π Progress Tracking - Visual dashboard showing mastery levels across concepts
- π‘ Smart Hints - Progressive hint system to guide you without spoiling solutions
- π€ Export Reports - Generate detailed learning reports in Markdown, HTML, or PDF
- π Safe Execution - Sandboxed code execution for security
- Python 3.10 or higher
- pip package manager
- Clone the repository
git clone https://github.com/matte1782/pymaster.git
cd pymaster- Create virtual environment (recommended)
python -m venv .venv
# Activate on macOS/Linux:
source .venv/bin/activate
# Activate on Windows (PowerShell):
.venv\Scripts\Activate.ps1- Install dependencies
pip install -r requirements.txt- Run PyMaster
python pymaster.pyWhen you first run PyMaster, you'll be prompted for a username:
Enter your username [python_learner]: yourname
π PyMaster - Advanced Python Learning
==================================================
1. π Start Assessment
2. π View Learning Path
3. π― Practice Challenges
4. π Progress Dashboard
5. π‘ Show Hints
6. π Achievements
7. π€ Export Report
8. πͺ Exit
The assessment adapts to your skill level:
- Answer questions correctly β harder questions
- Answer incorrectly β easier questions
- Determines your recommended starting level
- Select "Practice Challenges" from menu
- Read the challenge description and template
- Write your solution
- Type
ENDon a new line to submit - Get instant feedback on your code
Example Challenge Flow:
π Challenge: List Comprehension Practice
Filter even numbers from a list and double them
π Template Code:
[template shown...]
π» Enter your solution (type 'END' on a new line to finish):
def process_data(data):
return [x * 2 for x in data if x % 2 == 0]
END
β
PASSED
π Code Quality Metrics:
Syntax Validity: β
PEP8 Compliance: 95.0%
Performance: 100.0%
Execution Time: 0.0002s
During challenges, you can request hints:
- Hints are revealed progressively
- Each hint provides more specific guidance
- Hints used count is tracked
The dashboard shows:
- Mastery percentage for each concept
- Visual progress bars
- Module completion status
- Recent activity
Unlock achievements by:
- β¨ Completing your first challenge
- π― Perfect first-attempt passes
- β‘ Fast execution times
- π Perfect PEP8 scores
- π₯ Maintaining learning streaks
Generate comprehensive reports including:
- Overall progress summary
- Mastery levels by module
- Challenge statistics
- Achievements earned
- Personalized recommendations
Supported formats: Markdown (.md), HTML (.html), PDF (.pdf)
pymaster/
βββ pymaster.py # Main application
βββ requirements.txt # Runtime dependencies
βββ requirements-dev.txt # Development dependencies
βββ pytest.ini # Pytest configuration
βββ .flake8 # Flake8 configuration
βββ pymaster.db # SQLite database (created on first run)
βββ reports/ # Generated reports directory
βββ tests/ # Test suite
β βββ test_database.py
β βββ test_code_analyzer.py
β βββ test_challenges.py
β βββ test_performance.py
β βββ test_progress.py
β βββ test_achievements.py
β βββ test_export.py
β βββ test_integration.py
βββ docs/ # Documentation
βββ ARCHITECTURE.md
βββ API.md
βββ DATABASE.md
βββ CHALLENGES.md
βββ DEPLOYMENT.md
- Core Python - Functions, data types, control flow
- Data Structures - Lists, dicts, sets, comprehensions
- Object-Oriented Programming - Classes, inheritance, polymorphism
- Error Handling - Exceptions, try/except, custom exceptions
- File I/O - Reading/writing files, context managers
- Decorators - Function decorators, class decorators
- Concurrency - Threading, async/await
- Testing - Unit tests, pytest, TDD
# Run all tests
pytest
# Run with coverage
pytest --cov=. --cov-report=html
# Run specific test file
pytest tests/test_database.py
# Run with verbose output
pytest -v# Format code
black .
# Lint code
flake8 .
# Type checking
mypy . --ignore-missing-importsSee docs/CHALLENGES.md for detailed guide.
Quick example:
challenge = CorePythonChallenge(
challenge_id="core_004",
title="Your Challenge Title",
description="Challenge description",
difficulty=3,
module="core_python",
concept="your_concept"
)
challenge.add_test_case({'function': 'solution', 'args': [1, 2]}, 3)
challenge.add_hint("First hint")PYMASTER_DB_PATH- Custom database location (default:pymaster.db)PYMASTER_SAFE_MODE- Enable strict sandboxing (true/false)PYMASTER_TIMEOUT- Code execution timeout in seconds (default:5)
The SQLite database is created automatically. To use a custom location:
export PYMASTER_DB_PATH="/path/to/custom/database.db"
python pymaster.pyImport Error: No module named 'rich'
pip install -r requirements.txtPermission Error on Windows
- Run PowerShell as Administrator
- Or use:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Database Lock Error
- Close any other PyMaster instances
- Delete
pymaster.db-journalif it exists
Code Execution Timeout
- Increase timeout:
export PYMASTER_TIMEOUT=10 - Check for infinite loops in your solution
- π Check documentation
- π Open an issue
- π¬ Discussions
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
- π Report bugs
- π‘ Suggest features
- π Improve documentation
- β¨ Add new challenges
- π§ͺ Write tests
- π§ Fix issues
This project is licensed under the MIT License - see LICENSE file for details.
- Built with Rich for beautiful terminal UI
- Inspired by interactive learning platforms
- Thanks to all contributors!
- 15+ Interactive Challenges
- 8 Learning Modules
- 10+ Achievement Badges
- Comprehensive Progress Tracking
Made with β€οΈ by Python learners, for Python learners
Getting Started β’ Documentation β’ Report Bug β’ Request Feature