This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Task: Build a Jos Market Produce API | |
| Project Overview | |
| Create a simple API for managing a produce market in Jos, Nigeria. Vendors can list their farm produce, and buyers can browse and place orders. | |
| Data Models (Pydantic) | |
| 1. Vendor | |
| id: int | |
| name: str (e.g., "Malam Audu", "Mama Grace") | |
| market_location: str (Terminus, Katako, Bukuru, Farin Gada, Building Materials) | |
| phone: str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fastapi import FastAPI, status, HTTPException | |
| from pydantic import BaseModel | |
| from datetime import datetime | |
| from typing import List, Optional, Dict | |
| from pprint import pprint | |
| app = FastAPI(title="Todo list") | |
| class User(BaseModel): | |
| username: str | |
| class UserCreate(User): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fastapi import FastAPI, status, HTTPException | |
| from pydantic import BaseModel | |
| from datetime import datetime | |
| from typing import List, Optional, Dict | |
| from pprint import pprint | |
| app = FastAPI(title="Todo list") | |
| class User(BaseModel): | |
| username: str | |
| class UserCreate(User): |