alitiq python SDK
Project description
alitiq-py , high performance, easy to use, ready for production python software development kit
Overview ๐ ๏ธ
Welcome to alitiq's Forecasting Service SDK, a robust Python-based SDK that simplifies interaction with alitiqโs Solar, Wind and Load Forecast APIs. This SDK enables seamless data retrieval, measurements management, and forecasting for solar power plants, energy demand, and more. Built with flexibility and scalability in mind, it supports a range of features such as pushing measurements, retrieving forecasts, and managing locations.
Before you start using the SDK, you need to obtain an API key. For the engine / load API you will receive your key and relevant information from the alitiq Team. To obtain a key for the solar power forecasting API register here: Solar-APP
This is a work in progress. We will shortly add an extensive documentation with step by step guides to use our API with python.
Features โจ
- Solar Power Plant Management:
Manage PV system configurations and retrieve forecasts for your solar power installations. - WindPark Management:
Manage WindPark configurations and retrieve forecasts for your portfolio. - Load Forecasting by alitiq Engine:
Fetch and manage energy load forecasts for heat, gas, and electricity demand. - Pushing and Retrieving Measurements:
Push new measurement data to the API and inspect historical measurement data. - Robust Validation:
Powered by Pydantic, ensuring data integrity for all API interactions.
Installation ๐ฆ
With pip:
pip install alitiq
Or check out locally:
-
Clone the repository:
git clone https://github.com/alitiq/alitiq-py.git cd alitiq-py
-
Install dependencies:
pip install -r requirements.txt
-
(Optional) Install the SDK locally:
pip install .
Quickstart ๐
Example shows how to add a new Solar PV power plant, retrieve most recent forecast and push measurements for a given location.
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 ( after 1-6 hours after creation available)
forecast = solar_api.get_forecast(location_id="SP123")
print(forecast)
# Post measurements
pv_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,
),
PvMeasurementForm(
location_id="SP123",
dt=datetime(2024, 6, 10, 10, 30).isoformat(),
power=150.0,
power_measure="kW",
timezone="UTC",
interval_in_minutes=15,
),
]
response = solar_api.post_measurements(pv_measurements)
print(response)
Please go to our docs for detailed information alitiq-Docs
Project Structure ๐๏ธ
alitiq/
โโโ enumerations/
โ โโโ __init__.py
โ โโโ forecast_models.py
โ โโโ services.py
โ
โโโ models/
โ โโโ __init__.py
โ โโโ load_forecast.py
โ โโโ solar_power_forecast.py
โ โโโ wind_power_forecast.py
โ
โโโ __init__.py
โโโ base.py
โโโ load_forecast.py
โโโ solar_power_forecast.py
โโโ wind_power_forecast.py
Key Modules ๐
Solar Forecasting Module (solar_power_forecast.py)
Manage PV systems and retrieve solar power forecasts. Key methods:
create_location: Add new PV system configurations.list_locations: List current portfoliodelete_location: Deletes one location from portfolioget_forecast: Retrieve solar power forecasts for a specific location.get_forecast_portfolio: Retrieve solar power forecasts for the whole portfolio.push_measurements: Submit real-time measurements for your solar plant.get_measurements: Retrieve historical data for a location.
Wind Forecasting Module (wind_power_forecast.py)
Manage WindParks and retrieve wind power forecasts. Key methods:
create_location: Add new WindPark configurations.list_locations: List current portfoliodelete_location: Deletes one location from portfolioget_forecast: Retrieve wind power forecasts for a specific location.get_forecast_portfolio: Retrieve wind power forecasts for the whole portfolio.push_measurements: Submit real-time measurements for your WindPark.get_measurements: Retrieve historical data for a location.
Load Forecasting Module (load_forecast.py)
Interact with alitiq's load forecast API for heat, gas, and electricity. Key methods:
get_measurements: Retrieve historical data for a location.post_measurements: Push new measurement data.get_forecast: Fetch load forecasts for your configured location.
Contributing ๐ค
We welcome contributions! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m "Add a new feature"
- Push to your branch and submit a pull request.
License ๐
MIT License, see attached LICENSE
Developer Notes
Run python3 -m build to build the package and then upload with twine: twine upload -r pypi dist/*
Support & Contact ๐ง
For any questions or issues, please contact support@alitiq.com.
๐ Happy Forecasting! ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alitiq-2025.7.22.tar.gz.
File metadata
- Download URL: alitiq-2025.7.22.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf6d37e72d9e2c74e70a5926d6307dafe479e3a821077549fbb3a5b507157dc
|
|
| MD5 |
ce7ac917b40d0af62349471cb60523a8
|
|
| BLAKE2b-256 |
f5e15a2eeb83cdaa8785210dc5d5e4d766f31da8d32a8944fc4c3b2d127dfbfd
|
File details
Details for the file alitiq-2025.7.22-py3-none-any.whl.
File metadata
- Download URL: alitiq-2025.7.22-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65fe6ff766c67207f3c869b2308e57f8f01cf5a20f1e0ee99a6f147f0b9c2b9a
|
|
| MD5 |
67cec2973c4b2a5fa7e9557326dbb04d
|
|
| BLAKE2b-256 |
6942442a539be2bad90fc2c770ef0f3bab71200dc437580a07541bd066eb5f58
|