Files
fn_registry/python/pyproject.toml
T
egutierrez 86d68dc9f0 feat(infra): conexion y consulta directa a SQL Server (Navision) via pymssql
Grupo de capacidad nuevo 'sql-connect' (3 funciones) para conectar a un
Microsoft SQL Server (donde corre Navision) y consultar directamente, en
lugar del ida y vuelta manual de pegar CSVs.

- mssql_connect_py_infra: abre conexion pymssql (login_timeout acotado,
  credenciales por argumento, RuntimeError claro si falla).
- mssql_query_py_infra: SELECT parametrizada con binding seguro (sin
  inyeccion) sobre conexion abierta; devuelve {columns, rows, row_count};
  0 filas -> lista vacia; max_rows con fetchmany; read-only.
- run_mssql_query_py_pipelines: one-shot que compone connect+query y cierra
  siempre; CLI imprime JSON o CSV; contrasena desde env var (pass).

Pagina madre docs/capabilities/sql-connect.md + fila en INDEX.md.
Dependencia pymssql>=2.3.13 anadida a python/pyproject.toml + uv.lock.
Tests mock-based (11) verdes; error path verificado end-to-end contra el
driver real (host inalcanzable -> RuntimeError, acotado por login_timeout).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 11:29:49 +02:00

61 lines
1.6 KiB
TOML

[project]
name = "fn-registry-python"
version = "0.1.0"
description = "Funciones Python del fn-registry: Metabase API, ML, utilidades"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"chardet>=7.4.3",
"contextily>=1.7.0",
"cryptography>=46.0.6",
"duckdb>=1.5.2",
"fpdf2>=2.8.7",
"geopandas>=1.1.3",
"google-api-python-client>=2.197.0",
"google-auth>=2.49.1",
"google-cloud-bigquery>=3.25",
"google-cloud-bigquery-datatransfer>=3.22.0",
"google-cloud-bigquery-storage>=2.27",
"google-cloud-storage>=3.10.1",
"httpx",
"matplotlib>=3.10.9",
"openpyxl>=3.1.5",
"polars>=1.40.1",
"pymssql>=2.3.13",
"pypdf>=6.10.0",
"pyproj>=3.7.2",
"python-docx>=1.2.0",
"pyyaml>=6.0.3",
"rapidfuzz>=3.14.5",
"reportlab>=4.5.0",
"scikit-learn>=1.8.0",
"scipy>=1.17.1",
"seaborn>=0.13.2",
"shapely>=2.1.2",
"xlrd>=2.0.2",
]
[project.optional-dependencies]
nlp = [
"gliner>=0.2.13",
"glirel>=1.0.0",
]
jupyter = [
"jupyterlab>=4.0",
"jupyter-collaboration>=2.0",
"jupyter-mcp-server",
]
[dependency-groups]
dev = [
"pytest>=9.0.2",
]
[tool.pytest.ini_options]
# Las funciones del registry importan paquetes por su nombre raiz
# (p.ej. `from obsidian import format_obsidian_note`), por lo que el
# directorio `functions/` debe estar en sys.path al recolectar tests.
# `functions/obsidian` permite a los tests importar los modulos hoja por
# su nombre directo (p.ej. `from format_obsidian_note import ...`).
pythonpath = ["functions", "functions/obsidian"]