{"id":26045182,"url":"https://github.com/rahulmule/fastapi-sqlmodel-demo","last_synced_at":"2026-04-18T15:39:56.711Z","repository":{"id":279931146,"uuid":"940481189","full_name":"RahulMule/fastapi-sqlmodel-demo","owner":"RahulMule","description":"A simple REST API to manage games using **FastAPI**, **SQLModel**, and **PostgreSQL** (hosted on Azure).","archived":false,"fork":false,"pushed_at":"2025-02-28T10:28:25.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T19:36:37.973Z","etag":null,"topics":["fastapi","postgresql","python","sqlmodel"],"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/RahulMule.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":"2025-02-28T08:54:10.000Z","updated_at":"2025-02-28T10:28:28.000Z","dependencies_parsed_at":"2025-02-28T15:49:10.770Z","dependency_job_id":null,"html_url":"https://github.com/RahulMule/fastapi-sqlmodel-demo","commit_stats":null,"previous_names":["rahulmule/fastapi-sqlmodel-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RahulMule/fastapi-sqlmodel-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2Ffastapi-sqlmodel-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2Ffastapi-sqlmodel-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2Ffastapi-sqlmodel-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2Ffastapi-sqlmodel-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RahulMule","download_url":"https://codeload.github.com/RahulMule/fastapi-sqlmodel-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2Ffastapi-sqlmodel-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016930,"owners_count":26085911,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","sqlmodel"],"created_at":"2025-03-07T19:32:32.024Z","updated_at":"2025-10-13T20:42:16.619Z","avatar_url":"https://github.com/RahulMule.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI-SQLModel-PostgreSQL Game API\n\nA simple REST API to manage games using **FastAPI**, **SQLModel**, and **PostgreSQL** (hosted on Azure).\n\n## Features\n\n- **CRUD Operations**: Create, Read, Update, and Delete games.\n- **SQLModel** for database interactions.\n- **FastAPI** for building RESTful APIs.\n- **PostgreSQL** hosted on **Azure**.\n\n## Requirements\n\n- Python 3.8+\n- PostgreSQL (Azure or Local)\n- FastAPI \u0026 SQLModel\n\n## Setup Instructions\n\n### 1️⃣ Clone Repository\n\n```bash\ngit clone https://github.com/RahulMule/fastapi-sqlmodel-demo\ncd fastapi-sqlmodel-demo\n```\n\n### 2️⃣ Create a Virtual Environment\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows use: .venv\\Scripts\\activate\n```\n\n### 3️⃣ Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 4️⃣ Configure Database\n\nUpdate the `database/db.py` file with your **PostgreSQL connection string**:\n\n```python\nDATABASE_URL = \"postgresql://username:password@hostname:port/database_name\"\n```\n\n### 5️⃣ Run the Application\n\n```bash\nuvicorn app.main:app --reload\n```\n\n### 6️⃣ Access the API Docs\n\nOnce running, you can explore the API with **Swagger UI**:\n\n- 🚀 Open: [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)\n\n---\n\n## API Endpoints\n\n### 📌 Create a Game\n\n```http\nPOST /games/\n```\n\n**Request Body:**\n\n```json\n{\n  \"title\": \"Elden Ring\",\n  \"genre\": \"RPG\",\n  \"platform\": \"PC\",\n  \"release_year\": 2022\n}\n```\n\n### 📌 Get All Games\n\n```http\nGET /games/\n```\n\n### 📌 Get a Single Game\n\n```http\nGET /games/{game_id}\n```\n\n### 📌 Update a Game\n\n```http\nPUT /games/{game_id}\n```\n\n**Request Body:**\n\n```json\n{\n  \"title\": \"Elden Ring: Shadow Edition\",\n  \"genre\": \"RPG\",\n  \"platform\": \"PC\",\n  \"release_year\": 2023\n}\n```\n\n### 📌 Delete a Game\n\n```http\nDELETE /games/{game_id}\n```\n\n---\n\n## 🔥 Technologies Used\n\n- **FastAPI** - High-performance web framework\n- **SQLModel** - ORM for structured data\n- **PostgreSQL** - Database hosted on Azure\n- **Uvicorn** - ASGI server\n\n## 👨‍💻 Contributing\n\n1. Fork the repo \u0026 create a new branch.\n2. Make changes and commit them.\n3. Open a Pull Request.\n\n## 📜 License\n\nThis project is licensed under the **MIT License**.\n\n---\n\n🚀 Happy Coding! 🎮\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulmule%2Ffastapi-sqlmodel-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulmule%2Ffastapi-sqlmodel-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulmule%2Ffastapi-sqlmodel-demo/lists"}