openclimatefix / pv-site-api

Site specific API for PV forecasting
6 stars 11 forks source link

Create inverter accessing endpoints #71

Open ericcccsliu opened 1 year ago

ericcccsliu commented 1 year ago

Create the following endpoints:

/sites/<site_uuid>/inverters

/inverters

Utilize the get_inverters_for_client function from pv-site-datamodel to get the inverters.

To access Enode, use httpx with a client to make requests to the endpoints above. You'll also need to get data from the database to determine the inverters for a specific site, by importing data models and making a query.

We'll have to create pydantic models for the inverter data responses. With datamodels, we can then write corresponding tests.