{"id":22352174,"url":"https://github.com/shamspias/hotel-reservation-fastapi","last_synced_at":"2026-04-29T08:02:07.704Z","repository":{"id":208214557,"uuid":"721087204","full_name":"shamspias/hotel-reservation-fastapi","owner":"shamspias","description":"Basic hotel reservation with fastapi to learn basic fastapi","archived":false,"fork":false,"pushed_at":"2023-11-20T11:25:54.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T12:11:49.503Z","etag":null,"topics":["fastapi","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/shamspias.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}},"created_at":"2023-11-20T10:30:17.000Z","updated_at":"2023-12-05T18:37:05.000Z","dependencies_parsed_at":"2023-11-20T11:48:14.672Z","dependency_job_id":null,"html_url":"https://github.com/shamspias/hotel-reservation-fastapi","commit_stats":null,"previous_names":["shamspias/hotel-reservation-fastapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shamspias/hotel-reservation-fastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fhotel-reservation-fastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fhotel-reservation-fastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fhotel-reservation-fastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fhotel-reservation-fastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shamspias","download_url":"https://codeload.github.com/shamspias/hotel-reservation-fastapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fhotel-reservation-fastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","python"],"created_at":"2024-12-04T12:17:41.305Z","updated_at":"2026-04-29T08:02:07.683Z","avatar_url":"https://github.com/shamspias.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Hotel Reservation System\n\n## Overview\nThis project is a simple FastAPI application for managing hotel reservations. It allows for creating, retrieving, and managing hotel reservations.\n\n## Installation\n\n### Requirements\n- Python 3.7+\n- Pip\n\n### Setup\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/shamspias/hotel-reservation-fastapi\n   cd hotel-reservation-fastapi\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Running the Application\n\nStart the FastAPI server:\n\n```bash\nuvicorn main:app --reload\n```\n\nThe API will be available at `http://127.0.0.1:8000`.\n\n## API Documentation\n\n### Endpoints\n\n#### 1. Create Reservation\n- **POST** `/reservations/`\n- **Description**: Create a new hotel reservation.\n- **Body**:\n  - `number_of_people`: Integer\n  - `full_name`: String\n  - `email`: String\n  - `phone_number`: String\n  - `address`: String\n  - `payment_card_info`: String (Note: For real applications, use a secure payment gateway)\n  - `stay_duration`: Integer\n  - `room_type`: String (e.g., 'single', 'double', 'suite')\n\n#### 2. Read Reservations\n- **GET** `/reservations/`\n- **Description**: Retrieve a list of all reservations.\n- **Query Parameters**:\n  - `skip`: Integer (optional)\n  - `limit`: Integer (optional)\n\n#### 3. Read Single Reservation\n- **GET** `/reservations/{reservation_id}`\n- **Description**: Retrieve details of a specific reservation.\n- **Path Parameters**:\n  - `reservation_id`: Integer\n\n### Example Usage\n\nRequest:\n\n```bash\ncurl -X 'POST' \\\n  'http://127.0.0.1:8000/reservations/' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"number_of_people\": 2,\n  \"full_name\": \"John Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"phone_number\": \"123-456-7890\",\n  \"address\": \"123 Main St, Anytown, AT 12345\",\n  \"payment_card_info\": \"1234567890123456, 12/25, 123\",\n  \"stay_duration\": 5,\n  \"room_type\": \"double\"\n}'\n```\n\nResponse:\n\n```json\n{\n  \"id\": 1,\n  \"number_of_people\": 2,\n  \"full_name\": \"John Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"phone_number\": \"123-456-7890\",\n  \"address\": \"123 Main St, Anytown, AT 12345\",\n  \"payment_card_info\": \"1234567890123456, 12/25, 123\",\n  \"stay_duration\": 5,\n  \"room_type\": \"double\"\n}\n```\n\n## Security and Improvements\n\n- **Security**: For handling payment information, integrate with a secure payment gateway. Do not store sensitive payment details directly in the database.\n- **Authentication**: Implement user authentication and authorization for better security.\n- **Database**: For production, consider using a more robust database system like PostgreSQL.\n- **Error Handling**: Improve error handling for a more resilient application.\n- **Testing**: Add unit and integration tests.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fhotel-reservation-fastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshamspias%2Fhotel-reservation-fastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fhotel-reservation-fastapi/lists"}