Primera version estable de microservicios

This commit is contained in:
2025-07-28 11:04:18 -06:00
parent 42a564cd74
commit 5f58fabcfe
37 changed files with 5079 additions and 0 deletions

1
api/__init__.py Normal file
View File

@@ -0,0 +1 @@
# API package

1
api/api_v1/__init__.py Normal file
View File

@@ -0,0 +1 @@
# API v1 package

14
api/api_v1/api.py Normal file
View File

@@ -0,0 +1,14 @@
from fastapi import APIRouter
# En Python, no se pueden usar llaves {} para importar múltiples módulos.
# Debes usar paréntesis () para hacer importaciones multilínea.
from api.api_v1.endpoints import (
health,
pedimentos
)
api_router = APIRouter()
# Incluir routers de endpoints
api_router.include_router(health.router, tags=["health"])
api_router.include_router(pedimentos.router, tags=["pedimentos"])

View File

@@ -0,0 +1 @@
# Endpoints package

View File

@@ -0,0 +1,22 @@
from fastapi import APIRouter
from core.config import settings
router = APIRouter()
@router.get("/health")
async def health_check():
"""Endpoint para verificar el estado del servicio"""
return {
"status": "healthy",
"service": settings.APP_NAME,
"version": settings.APP_VERSION
}
@router.get("/")
async def root():
"""Endpoint raíz del microservicio"""
return {
"message": f"Bienvenido a {settings.APP_NAME}",
"version": settings.APP_VERSION,
"docs": "/docs"
}

File diff suppressed because it is too large Load Diff