Packages¶
This page lists note-worthy classes and data models.
energyquantified
¶
The top-level package with the main class:
EnergyQuantified
: The client class. Use this class to initialize the client with an API key and to access API operations.
There is also additional class available here:
RealtoConnection
: An alternative client class for Realto users. Use this class to connect to the API via a Realto subscription.
energyquantified.data
¶
Where the time series, period-based series and OHLC data models are implemented:
Timeseries
: The time series data model. A time series is more or less a series of values. There are three different value types:
TimeseriesList
: A list of time series objects.
Periodseries
: The period-based series data model. It has two different period types:
OHLC
: A data class for a single OHLC. OHLC objects has a reference to:
Product
: A description of a traded product (future contract).
OHLCList
: A list of OHLC data objects.
SRMC
: The server response from an short-run marginal cost (SRMC) calculation. It has multiple attributes, most are defined and used elsewhere. But it has one that is specific for SRMC:
SRMCOptions
: A data class holding all factors used in an SRMC calculation.
energyquantified.metadata
¶
Metadata classes are data classes with constants, such as enumerators. There
are quite many classes in energyquantified.metadata
:
These two enumerators are useful for aggregation:
Aggregation
: Aggregetion methods such as mean, max, min, and so forth.
Filter
: Enumerator of filters for electricity futures products such as base, peak.
Area
: Representing a price area (or country). An area has a set of exchangeBorder
with some capacityAllocation
.
Curve
: The identifier of any data series on Energy Quantified. Curves have aCurveType
to define its storage types (time series, instance, period-based, OHLC) andDataType
for its data type (forecast, normal, actual, etc.)
Instance
: The identifier of any instance (forecasts, mostly).
Place
: An identifier of anything with a geographical location, such as a powerplant, a large consumer, a location on a river. SeePlaceType
for all types.
OHLCField
: Enumerator of fields in OHLC data objects.
ContractPeriod
: Enumerator of contract periods for OHLC data objects. Typically week, month, quarter, year.
energyquantified.time
¶
Date and time utilities.
Resolution
: A combination of a frequency and a time zone. It has utility methods for stepping forward and backward in a given interval.
Frequency
: Enumerator of supported frequencies on Energy Quantified. Mostly used for aggregations and in combination with resolutions.Commonly used time zones in the European power markets:
local_tz()
: Get your the local time zone on your workstation.Useful functions to get dates and date-times:
now()
: Get a time zone aware date-time of the current time.
today()
: Get a time zone aware date-time of the today at midnight.
to_timezone()
: Convert a date-time to given time zone.
get_date()
: Create a date with sensible defaults.
get_datetime()
: Create a date-time with sensible defaults.
energyquantified.utils
¶
Most utilities are internals, but there is one public-facing class in utils:
Page
: An immutable list with paging support. Typically used by the metadata APIs to browse “pages” when searching for curves and places.
energyquantified.exceptions
¶
All exceptions are defined in this package.
APIError
: Base exception for all API errors. It’s subclasses are:
InitializationError
: Exception for when client initialization fails.
PageError
: Exception for paging failures (see Page).
ParseException
: Exception for parsing errors on API responses.