{"id":26128931,"url":"https://github.com/bhumigor/fastapi-restful-app","last_synced_at":"2025-03-10T19:29:27.309Z","repository":{"id":281606167,"uuid":"945796161","full_name":"Bhumigor/Fastapi-Restful-App","owner":"Bhumigor","description":"A FastAPI RESTful application with MySQL, implementing CRUD operations using SQLAlchemy and Pydantic for data validation.","archived":false,"fork":false,"pushed_at":"2025-03-10T06:30:52.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T07:29:14.415Z","etag":null,"topics":["api-endpoints","fastapi","mysql","project-structure-for-fastapi","pydantic","restfulapi","sqlalchemy","uvicorn"],"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/Bhumigor.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-03-10T06:19:40.000Z","updated_at":"2025-03-10T06:37:29.000Z","dependencies_parsed_at":"2025-03-10T07:39:29.365Z","dependency_job_id":null,"html_url":"https://github.com/Bhumigor/Fastapi-Restful-App","commit_stats":null,"previous_names":["bhumigor/fastapi-restful-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhumigor%2FFastapi-Restful-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhumigor%2FFastapi-Restful-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhumigor%2FFastapi-Restful-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhumigor%2FFastapi-Restful-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bhumigor","download_url":"https://codeload.github.com/Bhumigor/Fastapi-Restful-App/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242912160,"owners_count":20205610,"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":["api-endpoints","fastapi","mysql","project-structure-for-fastapi","pydantic","restfulapi","sqlalchemy","uvicorn"],"created_at":"2025-03-10T19:29:25.974Z","updated_at":"2025-03-10T19:29:27.296Z","avatar_url":"https://github.com/Bhumigor.png","language":"Python","readme":"# FastAPI RESTful App\n\nA simple **FastAPI** project with **MySQL**, following **RESTful API principles** to manage resources using CRUD operations (Create, Read, Update, Delete).\n\n## 🚀 Features\n- FastAPI for high-performance APIs\n- MySQL database integration\n- SQLAlchemy for ORM\n- Pydantic for data validation\n- RESTful API structure\n\n## 🛠 Tech Stack\n- **FastAPI** (Backend Framework)\n- **MySQL** (Database)\n- **SQLAlchemy** (ORM for database interaction)\n- **Pydantic** (Data validation)\n- **Uvicorn** (ASGI server for running FastAPI)\n\n## 📌 Installation \u0026 Setup\n\n### 1️⃣ Clone the Repository\n```sh\ngit clone https://github.com/Bhumigor/Fastapi-Restful-App.git\ncd Fastapi-Restful-App\n```\n\n### 2️⃣ Create a Virtual Environment\n```sh\npython -m venv venv\nsource venv/bin/activate  # On macOS/Linux\nvenv\\Scripts\\activate  # On Windows\n```\n\n### 3️⃣ Install Dependencies\n```sh\npip install -r requirements.txt\n```\n\n### 4️⃣ Set Up Environment Variables\nCreate a `.env` file and add your database configuration:\n```sh\nDATABASE_URL=mysql+pymysql://username:password@localhost/db_name\n```\n\n### 5️⃣ Start the FastAPI Server\n```sh\nuvicorn main:app --reload\n```\n\n## 📡 API Endpoints\n\n| Method | Endpoint | Description |\n|--------|---------|-------------|\n| **GET** | `/items/` | Get all items |\n| **GET** | `/items/{item_id}` | Get item by ID |\n| **POST** | `/items/` | Create a new item |\n| **PUT** | `/items/{item_id}` | Update an existing item |\n| **DELETE** | `/items/{item_id}` | Delete an item |\n\n📌 **Visit API Docs:** Open **`http://127.0.0.1:8000/docs`** in your browser for interactive API documentation.\n\n## 🛠 Project Structure\n```sh\nFastapi-Restful-App/\n│── main.py           # FastAPI application entry point\n│── models.py         # Database models using SQLAlchemy\n│── routes.py         # API endpoints\n│── schemas.py        # Pydantic models for validation\n│── database.py       # Database connection setup\n│── config.py         # Configuration settings\n│── requirements.txt  # Project dependencies\n│── .env              # Environment variables (ignored in Git)\n```\n\n## 📌 Contributing\nFeel free to fork, create issues, and submit PRs! 🚀\n\n---\n💡 **Happy Coding!** 😊\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhumigor%2Ffastapi-restful-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhumigor%2Ffastapi-restful-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhumigor%2Ffastapi-restful-app/lists"}