CHORUS-API / PISTE.GOUV.FR
chorus-api 
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
Release files for chorus-api 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chorus_api-1.0.6.tar.gz | 24.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chorus_api-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.5 kB
Release files / chorus_api-1.0.6.tar.gz
| Download URL | chorus_api-1.0.6.tar.gz |
|---|---|
| Size | 24.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fca363cd7f7165ea339b9b27a57570ca4d3c8ad4f78ad16721f04db1a0760765
|
|
BLAKE2b-256 checksum How to use checksums |
cdaa0ae0f572e1ddc801a10f153b356e80b1d184a6b3ac7f68d968db06950713
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / chorus_api-1.0.6-py3-none-any.whl
| Download URL | chorus_api-1.0.6-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b863b36c200a048a26f06565a09eb4e8b18c50e730b8b62ed0bc58b7bcb6cb65
|
|
BLAKE2b-256 checksum How to use checksums |
5f16d556ef22a2d0212f78ddf71ec4b7ba5df2d4998a333d41e7e36a6f721a71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|