diff --git a/etl/src/api/main.py b/etl/src/api/main.py index 1133bec..557dd44 100644 --- a/etl/src/api/main.py +++ b/etl/src/api/main.py @@ -3,6 +3,7 @@ import polars as pl from data import etl_property_capacities as etl_pc from data import etl_property_capacities_monthly as etl_pcm from data import etl_property_capacities_weekdays as etl_pcw +from data import etl_property_neighbours as etl_pn from data import etl_region_capacities as etl_rc from data import etl_region_capacities_comparison as etl_rcc from fastapi import FastAPI, Response @@ -35,6 +36,11 @@ def properties_growth(): def properties_geo(): return d.properties_geo().pl().to_dicts() +@app.get("/property/{id}/neighbours") +def property_extractions(id: int): + capacities = etl_pn.property_neighbours(id) + return capacities + @app.get("/property/{id}/extractions") def property_extractions(id: int): return d.extractions_for(property_id = id).pl().to_dicts()