Endpoint für etl_property_neighbours hinzugefügt
parent
258f1e4df6
commit
cc71cbba2d
|
@ -3,6 +3,7 @@ import polars as pl
|
||||||
from data import etl_property_capacities as etl_pc
|
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_monthly as etl_pcm
|
||||||
from data import etl_property_capacities_weekdays as etl_pcw
|
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 as etl_rc
|
||||||
from data import etl_region_capacities_comparison as etl_rcc
|
from data import etl_region_capacities_comparison as etl_rcc
|
||||||
from fastapi import FastAPI, Response
|
from fastapi import FastAPI, Response
|
||||||
|
@ -35,6 +36,11 @@ def properties_growth():
|
||||||
def properties_geo():
|
def properties_geo():
|
||||||
return d.properties_geo().pl().to_dicts()
|
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")
|
@app.get("/property/{id}/extractions")
|
||||||
def property_extractions(id: int):
|
def property_extractions(id: int):
|
||||||
return d.extractions_for(property_id = id).pl().to_dicts()
|
return d.extractions_for(property_id = id).pl().to_dicts()
|
||||||
|
|
Loading…
Reference in New Issue