Skip to main content

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

# Prestations F15 à refacturer (pull-tout, dédup par `reference` côté consommateur)
with client.prestations() as stream:
    for prestation in stream:             # itère des PrestationF15 typés
        ...

# Résolution RSC : lot d'id_Affaire (X12) → ref_situation_contractuelle (POST RPC)
resultats = client.resoudre_rsc(["id_affaire_1", "id_affaire_2"])
par_id = {r.id_affaire: r for r in resultats}   # chaque résultat porte ref ou error

# Déclaration CTA parc entier en XLSX (octets du document servi par l'API)
contenu = client.declaration_cta_xlsx("2026-T3")  # trimestre non terminé → PreconditionNonRemplie

Le client Arrow (flux/releves/facturation/accise/cta historiques, plus declaration_cta(trimestre) → pl.DataFrame) vit dans electricore_client.arrow, derrière l'extra [arrow].

Conception

Voir ADR-0043.

Metadata

Release files for electricore-client 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for electricore-client 0.6.0
File Size Uploaded Provenance Actions
electricore_client-0.6.0.tar.gz 31.4 kB With provenance Details for electricore_client-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for electricore-client 0.6.0
File Interpreter ABI Platform Actions
electricore_client-0.6.0-py3-none-any.whl Python 3 none any Details for electricore_client-0.6.0-py3-none-any.whl

Total release size: 57.1 kB

Release files / electricore_client-0.6.0.tar.gz

Download URL electricore_client-0.6.0.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4ea358f391f91ebcd6213eb140e009566d1f3c3c235e1917bc2107f2cc8878b4
BLAKE2b-256 checksum
How to use checksums
163fb5e266f639e1a188171aa4698b3bafc56ebfa751dde3c07f38184c6487e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / electricore_client-0.6.0-py3-none-any.whl

Download URL electricore_client-0.6.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
364a314acececfa9ef104e1e6e78d6f1782c93d230b34812fa962d3fdaa4e5f5
BLAKE2b-256 checksum
How to use checksums
3d064229dd77cbdd8c76749e5760d5d9d93db47f7bde37e2d7439fa84427ab01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for electricore-client 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for electricore_client-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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