Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI + PostgreSQL CRUD API

A Python backend practice project built with FastAPI, SQLAlchemy, and PostgreSQL, demonstrating a simple REST API with database integration and CRUD operations.

Overview

This project demonstrates how to build a database-driven backend service using FastAPI and SQLAlchemy.

The application provides endpoints for creating, reading, updating, and deleting users while using PostgreSQL as the persistence layer.

Features

  • Create users
  • Retrieve all users
  • Retrieve a user by ID
  • Update users
  • Delete users
  • PostgreSQL database integration
  • SQLAlchemy ORM
  • Pydantic request/response validation
  • FastAPI dependency injection
  • HTTP exception handling

Technology Stack

  • Python
  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • Pydantic
  • Uvicorn
  • psycopg2

Project Structure

fastapi-postgres-test/
├── database.py
├── main.py
├── models.py
├── schemas.py
└── requirements.txt

-------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------

# fastapi-postgres-test
python


follow thes commands in cmd or terminal first :

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned

python -m venv .venv

.\.venv\Scripts\activate

at last if you installed uvicorn use tis command 
   uvicorn main:app --reload
otherwise just run code

About

Python backend project using FastAPI and PostgreSQL for REST API and database integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages