creating articles without sqlAlchemy.
A Python/PostgreSQL project for managing authors, magazines, and articles, with full test coverage.
- Create, update, delete, and search for magazines, authors, and articles
- Author-magazine relationships
- Article publishing and validation
- Full test suite using pytest
- PostgreSQL schema with constraints for data integrity
git clone <your-repo-url>
cd Articlespip install -r requirements.txt- Create a PostgreSQL database (e.g.,
articles_challenge). - Run the schema:
psql -U postgres -d articles_challenge -f lib/db/schema.sqlEdit your connection parameters in the code if needed (e.g., username, password, database name).
python main.pypytestlib/
db/
schema.sql
models/
author.py
magazine.py
article.py
main.py
tests/
test_author.py
test_magazine.py
requirements.txt
README.md
- Make sure your PostgreSQL server is running.
- All article content must be at least 100 characters (see schema constraints).
- Each author email must be unique.
MIT License