| import streamlit as st | |
| import polars as pl | |
| import requests | |
| GRIST_URL = "https://grist.numerique.gouv.fr/o/dim-chu-brest/api/docs/5ZXqTKBiHTD2qqUj6GVPtp" | |
| def load_grist(table: str)->pl.DataFrame: | |
| records = requests.get(f"{GRIST_URL}/tables/{table}/records").json()["records"] | |
| return pl.DataFrame(records).drop("id").unnest("fields") |