{"id":19316095,"url":"https://github.com/lahcenezzara/fastapi-getting-started","last_synced_at":"2026-05-09T09:41:38.021Z","repository":{"id":250436992,"uuid":"834473539","full_name":"LahcenEzzara/fastapi-getting-started","owner":"LahcenEzzara","description":"Getting Started with FastAPI","archived":false,"fork":false,"pushed_at":"2024-07-27T11:36:57.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T03:43:37.368Z","etag":null,"topics":["api","backend","beginner","crud","fastapi","http","json","pydantic","python","rest-api","tutorial","uvicorn","web-development","web-framework"],"latest_commit_sha":null,"homepage":"https://fastapi-getting-started-xpse.onrender.com","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/LahcenEzzara.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-07-27T11:27:21.000Z","updated_at":"2024-07-27T11:46:13.000Z","dependencies_parsed_at":"2024-07-27T12:47:56.080Z","dependency_job_id":"e81d378e-a0ce-4650-bd0c-2db6518c708d","html_url":"https://github.com/LahcenEzzara/fastapi-getting-started","commit_stats":null,"previous_names":["lahcenezzara/fastapi-getting-started"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LahcenEzzara%2Ffastapi-getting-started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LahcenEzzara%2Ffastapi-getting-started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LahcenEzzara%2Ffastapi-getting-started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LahcenEzzara%2Ffastapi-getting-started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LahcenEzzara","download_url":"https://codeload.github.com/LahcenEzzara/fastapi-getting-started/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240418037,"owners_count":19798115,"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","backend","beginner","crud","fastapi","http","json","pydantic","python","rest-api","tutorial","uvicorn","web-development","web-framework"],"created_at":"2024-11-10T01:09:52.407Z","updated_at":"2026-05-09T09:41:37.948Z","avatar_url":"https://github.com/LahcenEzzara.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![FastAPI Logo](fastapi.png)\n\n--------------------------\n\n# FastAPI Getting Started\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/LahcenEzzara/fastapi-getting-started.git\n   cd fastapi-getting-started\n   ```\n\n2. Create and activate a virtual environment:\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. Install the required dependencies:\n\n   ```bash\n   pip install fastapi\n   ```\n\n## Running the Application\n\nTo run the FastAPI application, use the following command:\n\n```bash\nfastapi dev\n```\n\nThis will start the server at http://127.0.0.1:8000.\n\n## API Endpoints\n\n### Root Endpoint\n\n- URL: /\n- Method: GET\n- Description: Returns a greeting message.\n- Response:\n\n  ```json\n  {\n    \"Hello\": \"World\"\n  }\n  ```\n\n### Read Item\n\n- URL: /items/{item_id}\n- Method: GET\n- Description: Retrieves an item by its ID. Optionally, a query parameter q can be included.\n- Parameters:\n  - item_id (int): The ID of the item.\n  - q (str, optional): A query string.\n- Response:\n\n  ```json\n  {\n    \"item_id\": 1,\n    \"q\": \"your_query\"\n  }\n  ```\n\n### Update Item\n\n- URL: /items/{item_id}\n- Method: PUT\n- Description: Updates an item's information.\n- Parameters:\n  - item_id (int): The ID of the item.\n  - item (Item): The item data to update.\n- Request Body:\n\n  ```json\n  {\n    \"name\": \"Item Name\",\n    \"price\": 10.0,\n    \"is_offer\": true\n  }\n  ```\n\n- Response:\n\n  ```json\n  {\n    \"item_name\": \"Item Name\",\n    \"item_id\": 1\n  }\n  ```\n\n## Data Models\n\n### Item\n\nThe Item model is defined as follows:\n\n```python\nfrom pydantic import BaseModel\nfrom typing import Union\n\nclass Item(BaseModel):\n    name: str\n    price: float\n    is_offer: Union[bool, None] = None\n```\n\n## Copyrights\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.\n\n**© 2024 Lahcen Ezzara**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahcenezzara%2Ffastapi-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flahcenezzara%2Ffastapi-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahcenezzara%2Ffastapi-getting-started/lists"}