Skip to content

Latest commit

 

History

History
208 lines (130 loc) · 6.82 KB

File metadata and controls

208 lines (130 loc) · 6.82 KB
title API Reference
description Complete reference for the solarfarmer Python SDK

API Reference

The SolarFarmer Python SDK is the official Python client for the SolarFarmer energy calculation service. This page documents all publicly exported functions and classes.


Overview

The SolarFarmer SDK is organized into the following main categories:

Core Functions & Classes

Configuration & Design

Advanced Options


Endpoint Functions

These are the primary functions for interacting with the SolarFarmer API.

run_energy_calculation()

::: solarfarmer.endpoint_modelchains.run_energy_calculation options: extra: show_root_toc_entry: false show_root_members: true

about()

::: solarfarmer.endpoint_about.about options: extra: show_root_toc_entry: false show_root_members: true

service()

::: solarfarmer.endpoint_service.service options: extra: show_root_toc_entry: false show_root_members: true

terminate_calculation()

::: solarfarmer.endpoint_terminate_async.terminate_calculation options: extra: show_root_toc_entry: false show_root_members: true


Main Classes

The core classes handle the complete workflow from plant design to results analysis:

  • PVSystem: Main class for constructing approximated PV plant designs from high-level specifications (location, capacity, equipment). Infers layout geometry and losses using simplified assumptions; results are suitable for screening, not detailed design
  • EnergyCalculationInputs: Root Pydantic model composing all inputs for a calculation run
  • PVPlant: Pydantic model describing the PV plant structure (transformers, mounting specs, etc.)
  • ModelChainResponse: Container for raw API response data from energy calculations
  • CalculationResults: Analysis tools for exploring and visualizing energy yield results

PVSystem

::: solarfarmer.PVSystem options: extra: show_root_toc_entry: false show_root_members: true

EnergyCalculationInputs

::: solarfarmer.EnergyCalculationInputs options: extra: show_root_toc_entry: false show_root_members: true

PVPlant

::: solarfarmer.PVPlant options: extra: show_root_toc_entry: false show_root_members: true

ModelChainResponse

::: solarfarmer.ModelChainResponse options: extra: show_root_toc_entry: false show_root_members: true

CalculationResults

::: solarfarmer.CalculationResults options: extra: show_root_toc_entry: false show_root_members: true


Plant Configuration Classes

Location

View in SolarFarmer API Reference{ target="_blank" .external }

Layout

View in SolarFarmer API Reference{ target="_blank" .external }

Inverter

View in SolarFarmer API Reference{ target="_blank" .external }

EnergyCalculationOptions

View in SolarFarmer API Reference{ target="_blank" .external }


Module and Equipment Specifications

MountingTypeSpecification

View in SolarFarmer API Reference{ target="_blank" .external }

TrackerSystem

View in SolarFarmer API Reference{ target="_blank" .external }

PanFileSupplements

View in SolarFarmer API Reference{ target="_blank" .external }

OndFileSupplements

View in SolarFarmer API Reference{ target="_blank" .external }


Advanced System Configuration

Transformer

View in SolarFarmer API Reference{ target="_blank" .external }

TransformerSpecification

View in SolarFarmer API Reference{ target="_blank" .external }

TransformerLossModelTypes

View in SolarFarmer API Reference{ target="_blank" .external }

AuxiliaryLosses

View in SolarFarmer API Reference{ target="_blank" .external }


Additional Configuration Classes

MonthlyAlbedo

View in SolarFarmer API Reference{ target="_blank" .external }


Version Information

::: solarfarmer.version options: extra: show_root_toc_entry: false show_root_members: true


Configuration

The SDK can be configured using environment variables:

  • SF_API_KEY: Your SolarFarmer API authentication key (imported from environment)
  • SF_API_URL: Override the default SolarFarmer API URL

You can also pass these values directly as keyword arguments to the endpoint functions.