Skip to content

Pandafiableresponse

Bases: Response

Class to handle API response from the Solcast API for timeseries data.

Attributes:

Name Type Description
code int

HTTP status code of the response

url str

The URL that was requested

data Optional[bytes]

Raw response data as bytes

success bool

Whether the request was successful

method str

HTTP method used (GET, POST, etc.)

exception Optional[str]

Exception message if request failed

Examples:

>>> response = Response(code=200, url="...", data=b"...", success=True, method="GET")
>>> response.to_pandas()

to_pandas()

Return the data as a Pandas DataFrame with a DatetimeIndex.