The iRecharge Backend API is built with FastAPI and provides endpoints for managing articles, providers, and prices.
pip install fastapi uvicorn
### Installing Dependencies
```bash
uvicorn main:app --reload
## Endpoints
- **Create Article**: `POST /articles/`
- **Read Article**: `GET /articles/{article_no}`
- **Create Provider**: `POST /providers/`
- **Create Price**: `POST /prices/`
- **Read Prices**: `GET /prices/`
## Documentation
- Interactive API documentation: [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
- ReDoc documentation: [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc)
## Examples
### Create Article
```bash
curl -X POST "http://127.0.0.1:8000/articles/" -H "Content-Type: application/json" -d '{"article_no": 101, "currency": "US Dollar", "description": "Example Article"}'
**Read Article**
```bash
curl "http://127.0.0.1:8000/articles/101"
**Crate Provider**
```bash
curl -X POST "http://127.0.0.1:8000/providers/" -H "Content-Type: application/json" -d '{"provider_no": 1, "name": "Example Provider"}'