██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗████████╗
██╔══██╗╚██╗ ██╔╝████╗ ████║██╔══██╗██╔════╝╚══██╔══╝
██████╔╝ ╚████╔╝ ██╔████╔██║███████║███████╗ ██║
██╔═══╝ ╚██╔╝ ██║╚██╔╝██║██╔══██║╚════██║ ██║
██║ ██║ ██║ ╚═╝ ██║██║ ██║███████║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝
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