This project is an interactive web application designed to teach Python's regular expressions (RE) through a series of tutorials and quizzes. Users can progress through different levels, learning various aspects of regular expressions and testing their knowledge.
- Seven levels of tutorials covering different aspects of regular expressions
- Interactive quizzes for each level
- User progress tracking
- Dynamic tutorial navigation based on user's current level
- Python 3.12
- FastHTML: A Python library for creating HTML content
- HTMX: For dynamic content updates without full page reloads
- SQLite: For user data storage
- Pydantic: For data validation and settings management
- Markdown: For rendering tutorial content
main.py
: The main application file containing route definitions and core logicmodels.py
: Pydantic models for data structuresdatabase.py
: Database operations using SQLitecontent/
: Directory containing tutorial markdown files and quiz JSON filesstatic/
: Directory containing CSS styles
- Ensure you have Python 3.12 installed.
- Install the required packages:
pip install python-fasthtml pydantic markdown
- Run the application:
python main.py
- Open a web browser and navigate to
http://localhost:5001
- Enter a username to start or continue your progress.
- Read through the tutorial for each level.
- Complete the quiz for each level to advance.
- Use the tutorial buttons on the right to review previous levels.
Contributions to improve the tutorials, add more quiz questions, or enhance the application are welcome. Please submit a pull request with your changes.
This project is open-source and available under the MIT License.