API Pedidos - Estructura + Modelos
This commit is contained in:
42
README.md
Normal file
42
README.md
Normal 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
|
||||
Reference in New Issue
Block a user