Skip to content

ly441/Articles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Articles

creating articles without sqlAlchemy.

Articles Challenge

A Python/PostgreSQL project for managing authors, magazines, and articles, with full test coverage.

Features

  • 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

Setup

1. Clone the repository

git clone <your-repo-url>
cd Articles

2. Install dependencies

pip install -r requirements.txt

3. Set up the database

  • Create a PostgreSQL database (e.g., articles_challenge).
  • Run the schema:
psql -U postgres -d articles_challenge -f lib/db/schema.sql

4. Configure database connection

Edit your connection parameters in the code if needed (e.g., username, password, database name).

Running the App

python main.py

Running Tests

pytest

Project Structure

lib/
  db/
    schema.sql
  models/
    author.py
    magazine.py
    article.py
main.py
tests/
  test_author.py
  test_magazine.py
requirements.txt
README.md

Notes

  • 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.

License

MIT License


About

creating articles without sqlAlchemy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages