{"id":19258250,"url":"https://github.com/pasan-pahasara/fastapi-crud-postgresql","last_synced_at":"2026-04-16T05:03:59.211Z","repository":{"id":247020318,"uuid":"735652563","full_name":"Pasan-Pahasara/FastAPI-CRUD-PostgreSQL","owner":"Pasan-Pahasara","description":"\"FastAPI-CRUD-PostgreSQL is a simple and efficient implementation for performing CRUD operations using the FastAPI framework with a PostgreSQL database.\"","archived":false,"fork":false,"pushed_at":"2023-12-31T07:09:28.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-05T09:19:03.040Z","etag":null,"topics":["fastapi","postgresql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pasan-Pahasara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-25T17:33:23.000Z","updated_at":"2024-07-06T03:41:46.000Z","dependencies_parsed_at":"2024-07-06T05:49:09.093Z","dependency_job_id":"478d91ac-3145-477f-aaac-bdb0cb452338","html_url":"https://github.com/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL","commit_stats":null,"previous_names":["pasan-pahasara/fastapi-crud-postgresql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasan-Pahasara%2FFastAPI-CRUD-PostgreSQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasan-Pahasara%2FFastAPI-CRUD-PostgreSQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasan-Pahasara%2FFastAPI-CRUD-PostgreSQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasan-Pahasara%2FFastAPI-CRUD-PostgreSQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pasan-Pahasara","download_url":"https://codeload.github.com/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356190,"owners_count":19788512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","postgresql","python"],"created_at":"2024-11-09T19:12:46.304Z","updated_at":"2026-04-16T05:03:59.173Z","avatar_url":"https://github.com/Pasan-Pahasara.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# FastAPI-CRUD-PostgreSQL\r\n\r\n\"FastAPI-CRUD-PostgreSQL with SQLAlchemy is an introduction to building a FastAPI application that performs CRUD operations using the SQLAlchemy ORM with a PostgreSQL database. This project demonstrates the power of FastAPI in combination with the robust data manipulation capabilities provided by SQLAlchemy, offering a seamless and efficient solution for creating, reading, updating, and deleting data in a PostgreSQL database.\"\r\n\r\n## Configurations\r\n\r\n- **`Installation FastAPI`**\r\n\r\n```\r\npip install uvicorn fastapi\r\n```\r\n\r\n- **`Installation Others`**\r\n\r\n```\r\npip install sqlalchemy \r\n```\r\n```\r\npip install pyscopg2\r\n```\r\n```\r\npip install psycopg2  \r\n```\r\n```\r\npip install python-dotenv\r\n```\r\n\r\n- **`Example`**\r\n  ###### Create a file main.py with:\r\n  \r\n```\r\nfrom typing import Union\r\n\r\nfrom fastapi import FastAPI\r\n\r\napp = FastAPI()\r\n\r\n\r\n@app.get(\"/\")\r\ndef read_root():\r\n    return {\"Hello\": \"World\"}\r\n\r\n\r\n@app.get(\"/items/{item_id}\")\r\ndef read_item(item_id: int, q: Union[str, None] = None):\r\n    return {\"item_id\": item_id, \"q\": q}\r\n```\r\n\r\n- **`Run it`**\r\n\r\n```\r\nuvicorn main:app --reload\r\n```\r\n\r\n## Links\r\n* 🔗 \u003ca href=\"https://documenter.getpostman.com/view/24952393/2s9Ykt4ycX\" target=\"_blank\"\u003ePostMan\u003c/a\u003e\r\n\r\n#  \r\n#### Clone this repository ✅\r\n```md\r\nhttps://github.com/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL.git\r\n```\r\n###                                              \r\n###### If you think my code is good pleace drop a Star \u003cimg src=\"https://github.com/Pasan-Pahasara/md-alpha/blob/main/star.webp\" width=\"40px\"\u003e\r\n\r\n![GitHub issues](https://img.shields.io/github/issues/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?\u0026labelColor=black\u0026color=eb3b5a\u0026label=Issues\u0026logo=issues\u0026logoColor=black\u0026style=for-the-badge)\r\n![GitHub Contributions](https://img.shields.io/github/contributors/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?\u0026labelColor=black\u0026color=8854d0\u0026style=for-the-badge)\r\n\r\n### License 📝\r\n[![GitHub license](https://img.shields.io/github/license/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?\u0026labelColor=black\u0026color=3867d6\u0026style=for-the-badge)](https://github.com/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL/blob/master/LICENSE)\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n\r\n![repo size](https://img.shields.io/github/repo-size/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?label=Repo%20Size\u0026style=for-the-badge\u0026labelColor=black\u0026color=20bf6b)\r\n \r\n![GitHub forks](https://img.shields.io/github/forks/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?\u0026labelColor=black\u0026color=0fb9b1\u0026style=for-the-badge)\r\n![GitHub stars](https://img.shields.io/github/stars/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?\u0026labelColor=black\u0026color=f7b731\u0026style=for-the-badge)\r\n![GitHub LastCommit](https://img.shields.io/github/last-commit/Pasan-Pahasara/FastAPI-CRUD-PostgreSQL?logo=github\u0026labelColor=black\u0026color=d1d8e0\u0026style=for-the-badge)\r\n\r\n\u003c/div\u003e\r\n\r\n\u003cdiv align=\"center\"\u003e \r\nIf you have any questions or just wanna say hi, \u003cbr\u003e\u003cb\u003eMAIL ME\u003c/b\u003e\u0026nbsp;\r\n  \u003ca href=\"mailto:pasanpahasara7788@gmail.com\"\u003e\r\n      \u003cimg width=\"20px\" src=\"https://github.com/Pasan-Pahasara/md-alpha/blob/main/gmail.svg\" /\u003e\r\n  \u003c/a\u003e\u003c/p\u003e\r\n  \r\n \u003c/div\u003e\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasan-pahasara%2Ffastapi-crud-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasan-pahasara%2Ffastapi-crud-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasan-pahasara%2Ffastapi-crud-postgresql/lists"}