API Pedidos - Estructura + Modelos

This commit is contained in:
Daniel Arroyo
2026-04-11 03:45:33 +00:00
commit 4d97545599
10 changed files with 100 additions and 0 deletions

42
README.md Normal file
View File

@@ -0,0 +1,42 @@
# API Pedidos
API REST para gestionar pedidos con Python FastAPI.
## Stack
- **Framework:** FastAPI
- **ORM:** SQLAlchemy
- **Database:** PostgreSQL
- **Migrations:** Alembic
- **Validation:** Pydantic
- **Testing:** pytest
## Structure
```
api-pedidos/
├── app/
│ ├── api/ # Endpoints
│ ├── models/ # SQLAlchemy models
│ ├── schemas/ # Pydantic schemas
│ ├── repositories/ # Data access layer
│ └── core/ # Configuración
├── tests/ # Tests unitarios
├── alembic/ # Migraciones
└── Dockerfile
```
## Running
```bash
pip install -r requirements.txt
uvicorn app.main:app --reload
```
## API Endpoints
- `GET /pedidos` - Listar pedidos
- `POST /pedidos` - Crear pedido
- `GET /pedidos/{id}` - Obtener pedido
- `PUT /pedidos/{id}` - Actualizar pedido
- `DELETE /pedidos/{id}` - Eliminar pedido