{"id":24554700,"url":"https://github.com/karan071/starter-template-prisma-py","last_synced_at":"2026-05-10T10:25:51.553Z","repository":{"id":264323868,"uuid":"893046477","full_name":"Karan071/Starter-template-Prisma-Py","owner":"Karan071","description":"This repository provides a comprehensive starter template for building Python web applications using FastAPI, Prisma Client Python, and PostgreSQL as the database. It is designed for developers looking to set up a robust and scalable backend with modern tools and frameworks.","archived":false,"fork":false,"pushed_at":"2024-11-23T12:14:00.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T03:33:31.312Z","etag":null,"topics":["docker","fastapi","postgresql-database","prisma-orm","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Karan071.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-23T11:50:25.000Z","updated_at":"2024-11-23T12:14:04.000Z","dependencies_parsed_at":"2024-11-23T12:41:01.706Z","dependency_job_id":null,"html_url":"https://github.com/Karan071/Starter-template-Prisma-Py","commit_stats":null,"previous_names":["karan071/prisma_py_template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan071%2FStarter-template-Prisma-Py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan071%2FStarter-template-Prisma-Py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan071%2FStarter-template-Prisma-Py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan071%2FStarter-template-Prisma-Py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karan071","download_url":"https://codeload.github.com/Karan071/Starter-template-Prisma-Py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902293,"owners_count":20366259,"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":["docker","fastapi","postgresql-database","prisma-orm","python"],"created_at":"2025-01-23T03:33:05.518Z","updated_at":"2026-05-10T10:25:46.522Z","avatar_url":"https://github.com/Karan071.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI + Prisma Client Python + PostgreSQL Starter Template\n\nThis repository is a starter template for building Python web applications using **FastAPI**, **Prisma Client Python**, and **PostgreSQL**. It includes a pre-configured project structure, database connection setup, and tools for managing migrations and queries.\n\n---\n\n## Table of Contents\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Setup Instructions](#setup-instructions)\n- [Project Structure](#project-structure)\n- [Usage](#usage)\n- [License](#license)\n\n---\n\n## Features\n- 🚀 **FastAPI**: High-performance Python framework for APIs.\n- 🗄️ **Prisma Client Python**: Modern ORM with type-safe database queries.\n- 🐘 **PostgreSQL**: Using Docker image.\n- 🔧 **Environment Variables**: Simplified configuration with `.env`.\n- 📜 **Migrations**: Prisma schema-based database migrations.\n\n---\n\n## Prerequisites\n\nEnsure you have the following installed:\n- **Python** (3.8 or higher)\n- **PostgreSQL** (Latest version)\n- **Node.js** (v16+ for Prisma CLI)\n\n---\n\n## Setup Instructions\n\n### Step 1: Clone the Repository\n```bash\ngit clone https://github.com/Karan071/Starter-template-Prisma-Py.git\ncd your-repo\n```\n\n### Step 2: Set Up the Python Environment\n  Create a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate # mac users\n.\\venv\\Scripts\\activate # windows\n```\n\n### Step 3: Install the Python dependencies:\n```bash\npip install -r requirements.txt\n```\n\n### Step 4: Run the docker.yaml file\n```bash\n  docker compose -f \"docker-compose.yaml\" up -d --build \n```\n\n### Step 5: Generate the Prisma Client\n```Bash\n  npx prisma generate\n```\n\n### Step 6 : Apply Database Migrations\n```Bash\nnpx prisma migrate dev --name init\n```\n\n### Step 7: Run the FastAPI Application\nStart the FastAPI development server:\n```Bash\nuvicorn app.main:app --reload\n```\n\nQuerying the Database\nUse the Prisma Python client for database queries. Example:\n\npython\n```Bash\nfrom prisma import Prisma\n\ndb = Prisma()\ndb.connect()\n\n# Create a new post\npost = db.post.create(\n    data={\n        \"title\": \"Hello World\",\n        \"content\": \"This is a test post.\",\n    }\n)\nprint(post)\n\ndb.disconnect()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran071%2Fstarter-template-prisma-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaran071%2Fstarter-template-prisma-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran071%2Fstarter-template-prisma-py/lists"}