CoolFace
Apppublic

disenosla2pc/generador-l2pc

sourceHugging Facemitupdated 3d agoView on Hugging Face
0likes
test_api.py9 linesDownload Raw Back to root
1import urllib.request, json2try:3    req = urllib.request.Request('http://localhost:5000/api/cotizaciones/todos')4    with urllib.request.urlopen(req) as response:5        data = json.loads(response.read().decode())6        print(f'Success: {data.get("success")}, items: {len(data.get("datos", []))}')7except Exception as e:8    print(f'Error: {e}')9