Skip to content

jisun05/python-oop-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-oop-project

Task Manager API (FastAPI + SQLAlchemy)

A simple REST API for managing users and tasks.

Built with an OOP layered architecture (Repository / Service / Router) and using Pydantic v2 style.

✨ Features

REST API powered by FastAPI (+ auto documentation at /docs)

SQLAlchemy ORM + SQLite

OOP separation: Repository / Service layers

Filtering: done=true/false

Pytest + TestClient + dedicated test database

Pydantic v2 ConfigDict(from_attributes=True) applied

🗂️Project Structure

structure_OOP

🏗️ Architecture

API (Routes & Handlers): HTTP layer (request/response, status code / exception handling)

Services: Business logic (duplication / existence validation, etc.)

Repositories: Encapsulated DB access (ORM queries)

🧱 Tech Stack

FastAPI, Uvicorn

SQLAlchemy , SQLite

Pydantic v2 (ConfigDict(from_attributes=True))

Pytest, httpx, pytest-cov

🐳 Docker

  1. Build the image
docker build -t python-oop-project .
  1. Run the container
docker run -d --name python-oop-project -p 8000:8000 python-oop-project
Application: http://localhost:8000
API docs (Swagger): http://localhost:8000/docs
  1. Using Docker Compose If you prefer Compose (recommended for multi-service setups):
docker compose up --build
  1. Clean up Stop and remove the container and image:
docker stop python-oop-project && docker rm python-oop-project
docker rmi python-oop-project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published