Skip to main content

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 opzionale arera) e composer verso ruleset verificati; defusedxml è nella base, openpyxl resta 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

italian_energy-0.11.0.tar.gz (261.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

italian_energy-0.11.0-py3-none-any.whl (123.3 kB view details)

Uploaded Python 3

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

Hashes for italian_energy-0.11.0.tar.gz
Algorithm Hash digest
SHA256 ae02d77886441b639a4c8c184d9ba29855ab9b68047763ec3fb7b7ebd6802b5f
MD5 632d5ce3b3e6d9bd49de7126a2e1942b
BLAKE2b-256 3da49c04ff05c33ff998ee2d7d39eb46f591bcb7b92fff736e59f54082f2ba2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for italian_energy-0.11.0.tar.gz:

Publisher: release.yml on giulios123/italian-energy-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for italian_energy-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8c37f1b1a1923a67544aed6abdcbc95741ad9d66e10aa3a18be767da2de0186
MD5 a9f597df899f1d9fe128f45d9b15bec7
BLAKE2b-256 6c126ad943310e73827caaf66e35bd08786c4aadbde22ab6697551e70f20740e

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page