Python project for managing authors, magazines, and articles using raw SQL (no SQLAlchemy).
- Project structure created
- Virtual environment set up
- Git repository initialized
- SQLite database connection (
database_utils.py
) - Tables created: authors, magazines, articles
- Foreign key constraints working
- Author class: Create, save, find by ID. Name is read-only.
- Magazine class: Create, save, find by ID. Name and category can be updated.
- Article class: Create, save, find by ID. Title is read-only. Links authors to magazines.
- Author relationships: Get articles by author, magazines they've written for, topic areas
- Magazine relationships: Get articles in magazine, contributing authors, article titles
- Advanced queries: Authors with 2+ articles per magazine, unique categories per author
- Activate virtual environment:
source venv/bin/activate
- Test current work:
python debug.py
andpytest -q
lib/database_utils.py
- Database setuplib/author.py
- Author classlib/magazine.py
- Magazine classlib/article.py
- Article class (completed)debug.py
- For testing classestests/test_all.py
- Pytest Test suite