Initial clean commit

This commit is contained in:
jlimolina 2026-01-13 13:39:51 +01:00
commit 6784d81c2c
141 changed files with 25219 additions and 0 deletions

9
models/categorias.py Normal file
View file

@ -0,0 +1,9 @@
from psycopg2 import extras
from typing import List, Dict
def get_categorias(conn) -> List[Dict]:
with conn.cursor(cursor_factory=extras.DictCursor) as cur:
cur.execute("SELECT id, nombre FROM categorias ORDER BY nombre;")
return cur.fetchall()