A REST API built using FastAPI, SQLite, SQLAlchemy, and Pydantic to manage textile fabric inventory.
- Add Fabric Product
- Get All Fabric Products
- Get Fabric By ID
- Update Fabric Details
- Delete Fabric Product
- Update Fabric Stock
- Input Validation
- Exception Handling
- Interactive Swagger Documentation
- FastAPI
- SQLite
- SQLAlchemy ORM
- Pydantic
- Uvicorn
fabric_inventory/
│
├── app/
│ ├── main.py
│ ├── database.py
│ ├── models.py
│ ├── schemas.py
│ └── routers/
│ └── fabric.py
│
├── images/
├── README.md
├── requirements.txt
└── .gitignore
| Method | Endpoint | Description |
|---|---|---|
| POST | /fabrics/ | Add Fabric |
| GET | /fabrics/ | Get All Fabrics |
| GET | /fabrics/{id} | Get Fabric By ID |
| PUT | /fabrics/{id} | Update Fabric |
| DELETE | /fabrics/{id} | Delete Fabric |
| PATCH | /fabrics/{id}/stock | Update Stock |
Clone the repository:
git clone https://github.com/atmihaa-06/fabric-inventory-fastapi.gitNavigate to the project:
cd fabric_inventoryInstall dependencies:
pip install -r requirements.txtRun the server:
uvicorn app.main:app --reloadOpen:
http://127.0.0.1:8000/docs
Atmihaa MB




