Skip to main content

Client Python léger (httpx + pydantic) vers l'API facturiste electricore — sans polars/duckdb/fastapi

Project description

electricore-client

Client Python léger vers l'API facturiste electricore.

Dépendances de base : httpx + pydantic uniquement — pas de polars, duckdb ni fastapi. Pensé pour être consommé par souscriptions_odoo (Odoo 19) et tout intégrateur qui n'a pas besoin de tirer le moteur entier.

Lecture seule sur electricore (« Odoo tire d'electricore », ADR-0027/0012).

Installation

pip install electricore-client            # base : httpx + pydantic
pip install "electricore-client[arrow]"   # + client Arrow (DataFrames polars)

Usage

from electricore_client import ElectricoreClient

client = ElectricoreClient(url="https://electricore.example", api_key="…")

# Méta-périodes mensuelles (flux JSONL typé, sans pagination)
with client.meta_periodes(mois="2026-05-01") as stream:
    print(stream.contract_version)        # version de contrat (en-tête)
    for periode in stream:                # itère des PeriodeMeta typés
        ...

# Chronologie d'un point ou d'un contrat (union discriminée)
with client.chronologie(pdl="12345678901234") as stream:
    lignes = stream.collect()

# Calculateur TURPE variable (POST RPC, pas un stream)
resultats = client.turpe_variable([...])  # résultats indexés par id opaque

Le client Arrow historique (flux/releves/facturation/accise/ctapl.DataFrame) vit dans electricore_client.arrow, derrière l'extra [arrow].

Conception

Voir ADR-0043.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

electricore_client-0.2.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

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

electricore_client-0.2.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file electricore_client-0.2.0.tar.gz.

File metadata

  • Download URL: electricore_client-0.2.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for electricore_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d182d5f700901cf977c44ff3284863ce0f438cb0a0183a84e0a2e3f65bd26768
MD5 1208952699f0ce850ea307835462e794
BLAKE2b-256 3833b8dfdd0d466d7927556bdb9a46cff74fd4af2386796d515aa07ff2884791

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricore_client-0.2.0.tar.gz:

Publisher: release-client.yml on Energie-De-Nantes/electricore

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

File details

Details for the file electricore_client-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for electricore_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b7197c5b42249c94fdb8118ab51e04c859e991646d517e68eee74655c9584bc
MD5 b6bdb965e0b94839ed5b3221b2b7bfe6
BLAKE2b-256 69844ed4734a4408d6e4b49959de3ac9b443a1cce021ab223a7885e28cb0e39b

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricore_client-0.2.0-py3-none-any.whl:

Publisher: release-client.yml on Energie-De-Nantes/electricore

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page