Skip to main content

Chorus API Package https://piste.gouv.fr

Project description

CHORUS-API / PISTE.GOUV.FR

chorus-api Downloads

Chorus API Package https://piste.gouv.fr

How to install chorus-api

Install

pip install chorus-api

1.0.6

CHANGES

  • base64 encode file open file as binary

1.0.5

CHANGES

  • Fix base_64_encode_file method in utils
  • Allow pass encoding

1.0.4

CHANGES

Integration de l'état courant

  • Le service ConsulterCR permet de consulter les informations liées au dépôt d'un flux et de récupérer au format PDF le compte rendu de traitement du flux déposé via le portail ou le service exposé DeposerFluxFacture.
Key code description
IN_RECU IN_RECU Le flux a été reçu par Chorus Pro
IN_TRAITE_SE_CPP IN_TRAITE_SE_CPP Le fichier arrivé dans le système d’échange Chorus Pro
IN_EN_ATTENTE_TRAITEMENT_CPP IN_EN_ATTENTE_TRAITEMENT_CPP Le flux est en liste d’attente
IN_EN_COURS_TRAITEMENT_CPP IN_EN_COURS_TRAITEMENT_CPP Le flux est en cours de traitement
IN_INCIDENTE IN_INCIDENTE Flux non traité par le système d’échange, il sera nécessaire de reprendre le flux intégralement.
IN_REJETE IN_REJETE Le flux a été traité mais rejeté car il comporte des anomalies
IN_EN_ATTENTE_RETRAITEMENT_CPP IN_EN_ATTENTE_RETRAITEMENT_CPP Le flux a été bloqué, il attend une reprise manuelle
IN_INTEGRE IN_INTEGRE Le flux a été traité et tout a été intégré dans Chorus Pro.
IN_INTEGRE_PARTIEL IN_INTEGRE_PARTIEL Cela concerne des flux qui sont en rejet partiel, seules les factures correctes sont intégrées.

Usage

from chorusapi.client import ChorusAPI
from exemples.env import CLIENT_ID, CLIENT_SECRET

chorus_api = ChorusAPI(
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET
)

token = chorus_api.auth().get_token()
print(token)
from chorusapi.client import ChorusAPI
from exemples.env import CLIENT_ID, CLIENT_SECRET, TECH_USERNAME, TECH_PASSWORD

chorus_api = ChorusAPI(
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET,
    tech_username=TECH_USERNAME,
    tech_password=TECH_PASSWORD
)

status_depot = chorus_api.auth().consulter_cr("CPP0XXXXXXXXXXXXX")
print(status_depot.__dict__)

More details in examples folders

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

chorus_api-1.0.6.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

chorus_api-1.0.6-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file chorus_api-1.0.6.tar.gz.

File metadata

  • Download URL: chorus_api-1.0.6.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chorus_api-1.0.6.tar.gz
Algorithm Hash digest
SHA256 fca363cd7f7165ea339b9b27a57570ca4d3c8ad4f78ad16721f04db1a0760765
MD5 76bbcb111656a736479e7a393007692c
BLAKE2b-256 cdaa0ae0f572e1ddc801a10f153b356e80b1d184a6b3ac7f68d968db06950713

See more details on using hashes here.

File details

Details for the file chorus_api-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: chorus_api-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chorus_api-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b863b36c200a048a26f06565a09eb4e8b18c50e730b8b62ed0bc58b7bcb6cb65
MD5 6c1eb4bd406bb2bc289a947be5e00aba
BLAKE2b-256 5f16d556ef22a2d0212f78ddf71ec4b7ba5df2d4998a333d41e7e36a6f721a71

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