Overview ๐ ๏ธ
alitiq-py
is a versatile Python SDK designed to interact with alitiqโs Solar and Demand Forecast APIs. This SDK empowers developers with tools to manage solar PV systems, push and retrieve energy measurements, and obtain forecasts tailored to energy demand for heat, gas, and electricity. It is a production-ready solution built for scalability and ease of use.
Why Use alitiq-py?
- Seamless Integration: Quickly integrate with alitiq's powerful forecasting services.
- Comprehensive API Support: Manage solar portfolios, fetch demand forecasts, and push measurementsโall in one package.
- Future-Proof: Supports Python 3.10, 3.11, and 3.12.
- Pydantic-Powered Validation: Ensure accurate and reliable data exchange with the API.
Before using the SDK, you need an API key:
- For Solar Forecasting: Register at Solar-APP Show archive.org snapshot .
- For Demand Forecasting: Contact the alitiq team to obtain credentials.
Features โจ
- ๐ Solar Power Forecasting:
Effortlessly manage solar PV portfolios and fetch accurate forecasts. - ๐ Demand Forecasting:
Analyze and predict energy demand for heat, gas, and electricity. - ๐ค Push Measurements:
Add real-time or historical measurement data to refine forecasting accuracy. - ๐ก๏ธ Robust Validation:
Built-in Pydantic models ensure data reliability.
Installation ๐ฆ
Install via pip:
pip install alitiq
For local setup:
-
Clone the repository:
git clone https://github.com/alitiq/forecasting-sdk.git cd forecasting-sdk
-
Install dependencies:
pip install -r requirements.txt
-
Install the SDK locally:
pip install .
Quickstart ๐
Adding a New Solar PV System and Fetching Forecasts
This example shows how to create a solar PV system, retrieve forecasts, and submit measurements:
from datetime import datetime
from alitiq import alitiqSolarAPI, SolarPowerPlantModel, PvMeasurementForm
# Initialize the API client
solar_api = alitiqSolarAPI(api_key="your-api-key")
# Create a solar power plant location
plant = SolarPowerPlantModel(
site_name="My Solar Plant",
location_id="SP123",
latitude=48.160170,
longitude=10.55907,
installed_power=500.0,
installed_power_inverter=480.0,
azimuth=180.0,
tilt=25.0,
)
response = solar_api.create_location(plant)
print("Location created:", response)
# Retrieve a forecast (available 1-6 hours after creation)
forecast = solar_api.get_forecast(location_id="SP123")
print(forecast)
# Post measurements
measurements = [
PvMeasurementForm(
location_id="SP123",
dt=datetime(2024, 6, 10, 10).isoformat(),
power=120.5,
power_measure="kW",
timezone="UTC",
interval_in_minutes=15,
),
PvMeasurementForm(
location_id="SP123",
dt=datetime(2024, 6, 10, 10, 15).isoformat(),
power=90.8,
power_measure="kW",
timezone="UTC",
interval_in_minutes=15,
),
]
response = solar_api.post_measurements(measurements)
print(response)
Documentation ๐
For a detailed guide on setting up your PV system, check out:
How to Setup PV Systems at Alitiq.
Comprehensive API documentation is coming soon! ๐ง
License ๐
This SDK is licensed under the MIT License.
Support & Contact ๐ง
For any questions or issues, please reach out to:
- Email: dl@alitiq.com
- Website: alitiq Show archive.org snapshot
๐ Happy Forecasting with alitiq-py! ๐