{"id":30692066,"url":"https://github.com/martcpp/crud-api-fastapi","last_synced_at":"2025-09-02T04:47:37.708Z","repository":{"id":237880980,"uuid":"795413073","full_name":"martcpp/crud-api-fastapi","owner":"martcpp","description":"building a book crude api with fast api and sql","archived":false,"fork":false,"pushed_at":"2024-05-05T08:09:02.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-06T08:31:40.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/martcpp.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":"2024-05-03T08:21:21.000Z","updated_at":"2024-05-06T08:31:40.381Z","dependencies_parsed_at":"2024-05-05T08:30:02.133Z","dependency_job_id":"f81b9b85-4feb-4a6a-9e18-34ed2f067d87","html_url":"https://github.com/martcpp/crud-api-fastapi","commit_stats":null,"previous_names":["martcpp/crud-api-fastapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martcpp/crud-api-fastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martcpp%2Fcrud-api-fastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martcpp%2Fcrud-api-fastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martcpp%2Fcrud-api-fastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martcpp%2Fcrud-api-fastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martcpp","download_url":"https://codeload.github.com/martcpp/crud-api-fastapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martcpp%2Fcrud-api-fastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273233274,"owners_count":25068731,"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-09-02T02:00:09.530Z","response_time":77,"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":[],"created_at":"2025-09-02T04:47:37.095Z","updated_at":"2025-09-02T04:47:37.701Z","avatar_url":"https://github.com/martcpp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Book Management API\n\nThis is a simple RESTful API built with FastAPI for managing books. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on a collection of books stored in a database.\n\n## Note\nmust have python installed if not fellow the guide [https://realpython.com/installing-python/]\n\n## Setup\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/martcpp/crud-api-fastapi.git\n   ```\n\n2. **Install dependencies:**\n\n   ```bash\n   pip install -r requirements.txt\n   cd src \n   ```\n\n3. **Run the application:**\n\n   ```bash\n   uvicorn app:app --reload\n   ```\n\n   The API will be available at `http://localhost:8000`.\n\n## using docker\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/martcpp/crud-api-fastapi.git\n   ```\n   ```bash\n   cd CRUD-API-FASTAPI\n   ```\n\n2. **Run the application:**\n\n   ```bash\n   docker build -t crud-api .\n   docker run -p 8000:8000 crud-api\n   ```\n\n   The API will be available at `http://localhost:8000`\n\n## Endpoints\n`http://localhost:8000/docs` for more information about  the API documentation\n\n### GET /books/\n\nRetrieve all books.\n\n### POST /books/\n\nCreate a new book. Send a JSON object with the book details in the request body.\n\nExample Request Body:\n\n```json\n{\n    \"title\": \"Example Book\",\n    \"author\": \"John Doe\",\n    \"year\": 2024,\n    \"isbn\": \"978-3-16-148410-0\"\n}\n```\n\n### GET /books/{book_id}\n\nRetrieve a specific book by its ID.\n\n### PUT /books/{book_id}\n\nUpdate an existing book by its ID. Send a JSON object with the updated book details in the request body.\n\n### DELETE /books/{book_id}\n\nDelete a specific book by its ID.\n\n## Data Schema\n\nThe following fields are available for a book:\n\n- `id` (integer): Unique identifier for the book.\n- `title` (string): Title of the book.\n- `author` (string): Author of the book.\n- `year` (integer): Year of publication.\n- `isbn` (string): ISBN (International Standard Book Number) of the book.\n\n## Dependencies\n\n- FastAPI: Web framework for building APIs with Python.\n- SQLAlchemy: SQL toolkit and Object-Relational Mapping (ORM) library for Python.\n- uvicorn: ASGI server for running FastAPI applications.\n- MySQL: MySQL server for running FastAPI applications with MySQL support enabled\n- psycopg2 : for connecting to to postgresql databases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartcpp%2Fcrud-api-fastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartcpp%2Fcrud-api-fastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartcpp%2Fcrud-api-fastapi/lists"}