italian-energy-core
Libreria Python open source, domain-first e deterministica per modellare, simulare e confrontare offerte di energia elettrica in Italia.
Stato:
v0.11.0— domain core, pricing fixed/indexed, Billing Engine data-driven, importer ARERA, ruleset domestici BT, Comparison Engine, Portale Offerte importer, Recommendation Engine, contratto d'integrazione Core–Platform e current domestic advisor implementati e verificati.
La release GitHub pubblica più recente è v0.11.0. Il package installabile è
disponibile come wheel e sdist negli asset della release. L'importer Portale Offerte
opera solo su cataloghi open-data ufficiali, replay storici esatti e offerte
elettriche domestiche BT; gas, UI, persistenza e scheduler restano fuori scope.
Obiettivi
Il package italian_energy è pensato come core riusabile per backend, comparatori, MCP server, frontend, Home Assistant, notebook e servizi cloud. Il dominio non dipende da Azure, AWS/GCP, web framework, database, autenticazione, LLM o sistemi AI.
La logica economica dovrà essere deterministica, testabile, riproducibile e spiegabile. Un LLM non viene usato per calcolare costi.
Installazione locale
uv sync --dev
uv run pytest
Installazione del package dalla release pubblicata:
pip install italian-energy==0.11.0
Architettura
domain/: value object, entità, provenance e risultati immutabili;pricing/: contratto del Pricing Engine e evaluator fixed/indexed deterministici;billing/: contratto e Billing Engine regolatorio con riconciliazione esplicita;comparison/: confronto deterministico all-in su offerte normalizzate, con matrice di copertura obbligatoria;portal_offers/: acquisizione allowlisted, snapshot/provenance, parsing e normalizzazione dei cataloghi Mercato Libero/PLACET verso il Comparison Engine;recommendation/: preferenze strutturate, shortlist e decisione consultiva separate dai costi;market/: indici e dati di mercato;arera/: snapshot raw, importer del workbook domestico ARERA 2026 (extra opzionalearera) e composer verso ruleset verificati;defusedxmlè nella base,openpyxlresta opzionale;data/billing/: ruleset e matrice JSON congelati, caricabili senza dipendenze XLSX.integration/: manifest, envelope JSON versionati e façade storica Core–Platform;
Le spec sono normative. Gli ADR registrano decisioni architetturali. Il Memory Bank descrive lo stato corrente e non sostituisce le spec.
Sviluppo
Leggere nell’ordine AGENTS.md, Memory Bank, spec attiva e ADR pertinenti. Il flusso obbligatorio è:
spec → test → implementazione minima → verifica → aggiornamento Memory Bank.
uv run ruff check .
uv run ruff format --check .
uv run mypy src tests
uv run pytest --cov=italian_energy --cov-branch
pre-commit run --all-files
uv run python scripts/verify_private_golden.py
uv run --extra arera python scripts/verify_arera_import.py
# Smoke live separato, con data esplicita (non usato dalla suite)
uv run python scripts/verify_portal_import.py --date 2026-09-08
Il verificatore golden usa soltanto il materiale in private/ e non pubblica
documenti o identificativi. Le regole normative restano nel fixture pubblico;
prezzi e importi del caso reale restano privati.
Licenza
Apache License 2.0. Vedere LICENSE.
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 italian_energy-0.11.0.tar.gz.
File metadata
- Download URL: italian_energy-0.11.0.tar.gz
- Upload date:
- Size: 261.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae02d77886441b639a4c8c184d9ba29855ab9b68047763ec3fb7b7ebd6802b5f
|
|
| MD5 |
632d5ce3b3e6d9bd49de7126a2e1942b
|
|
| BLAKE2b-256 |
3da49c04ff05c33ff998ee2d7d39eb46f591bcb7b92fff736e59f54082f2ba2e
|
Provenance
The following attestation bundles were made for italian_energy-0.11.0.tar.gz:
Publisher:
release.yml on giulios123/italian-energy-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
italian_energy-0.11.0.tar.gz -
Subject digest:
ae02d77886441b639a4c8c184d9ba29855ab9b68047763ec3fb7b7ebd6802b5f - Sigstore transparency entry: 2815051879
- Sigstore integration time:
-
Permalink:
giulios123/italian-energy-core@96279d08574980f03a1530bbf8e3c0fee11fe57b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/giulios123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@96279d08574980f03a1530bbf8e3c0fee11fe57b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file italian_energy-0.11.0-py3-none-any.whl.
File metadata
- Download URL: italian_energy-0.11.0-py3-none-any.whl
- Upload date:
- Size: 123.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8c37f1b1a1923a67544aed6abdcbc95741ad9d66e10aa3a18be767da2de0186
|
|
| MD5 |
a9f597df899f1d9fe128f45d9b15bec7
|
|
| BLAKE2b-256 |
6c126ad943310e73827caaf66e35bd08786c4aadbde22ab6697551e70f20740e
|
Provenance
The following attestation bundles were made for italian_energy-0.11.0-py3-none-any.whl:
Publisher:
release.yml on giulios123/italian-energy-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
italian_energy-0.11.0-py3-none-any.whl -
Subject digest:
c8c37f1b1a1923a67544aed6abdcbc95741ad9d66e10aa3a18be767da2de0186 - Sigstore transparency entry: 2815051892
- Sigstore integration time:
-
Permalink:
giulios123/italian-energy-core@96279d08574980f03a1530bbf8e3c0fee11fe57b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/giulios123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@96279d08574980f03a1530bbf8e3c0fee11fe57b -
Trigger Event:
workflow_dispatch
-
Statement type: