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.1.0.tar.gz (20.5 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.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: electricore_client-0.1.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for electricore_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db17b31c4dd24f36d7be60acff268afee3f9d3d056281001a77d511c8ad0df73
MD5 b93b1d3c3b04bced8742cdb9e69cc5f8
BLAKE2b-256 bb25ef0eda87ce60b494c783939560b9a58ab711ba4e4932dd01a3d85c8f5c19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for electricore_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33cc14b04958263a594dd331a9af4b8d22d06e372f9a90d300897ddafda605a1
MD5 1f5035e09b6380e531576a8ca391322d
BLAKE2b-256 82fdb518dd8f2da7d6a686343faf24ca480283572701dd803f5da232e2953885

See more details on using hashes here.

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