French State Budget Simulation API
HTTP API for OpenFisca
Used by LexImpact, a simulator of the French tax-benefit system.
Make use of OpenFisca a rules as code tax benefit system.
Install
pip install leximpact_socio_fisca_simu_etat
How to use
Fill me in please! Don't forget code examples:
from leximpact_socio_fisca_simu_etat.csg_simu import (
ReformeSocioFiscale,
compute_all_simulation,
)
reform = ReformeSocioFiscale(
base=2021,
amendement={
"prelevements_sociaux.contributions_sociales.csg.activite.imposable.taux": 0.068,
},
output_variables=["csg"],
quantile_nb=4,
quantile_compare_variables=["csg"],
)
resultat = compute_all_simulation(reform, annee_de_calcul="2021")
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:41] reform.amendement : None
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:41] No cache for 5078a86c7201f132a44472774283e4a774e85b9bd94c88c9e756d3cb2021, compute it.
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] OpenFisca a retourné des individus
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] reform.amendement : {'prelevements_sociaux.contributions_sociales.csg.activite.imposable.taux': 0.068}
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] No cache for 3580f21542881d1996a7b3a16a759d8318e58bdc44ac26ab6cfbf8662021, compute it.
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:49] OpenFisca a retourné des individus
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:49] Temps de traitement total pour la simulation 7.873102587996982 secondes
print(
f"Montant total de la csg : {resultat.result['amendement'].state_budget['csg']:,} €"
)
Montant total de la csg : -147,054,542,277.62744 €
How to develop
Please see contributing.
Metadata
Release files for leximpact-socio-fisca-simu-etat 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| leximpact_socio_fisca_simu_etat-0.1.9.tar.gz | 32.4 kB | Without provenance | Details for leximpact_socio_fisca_simu_etat-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| leximpact_socio_fisca_simu_etat-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for leximpact_socio_fisca_simu_etat-0.1.9-py3-none-any.whl |
Total release size: 67.9 kB
Release files / leximpact_socio_fisca_simu_etat-0.1.9.tar.gz
| Download URL | leximpact_socio_fisca_simu_etat-0.1.9.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
988a2afcb2850f87248895454811ff7b82640e2f29d07fae9430527db070526e
|
|
BLAKE2b-256 checksum How to use checksums |
77bd1378fc4bf16f11bd729bbd98b5f1ed66708ae932634576cb60a32957026b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.13
|
Release files / leximpact_socio_fisca_simu_etat-0.1.9-py3-none-any.whl
| Download URL | leximpact_socio_fisca_simu_etat-0.1.9-py3-none-any.whl |
|---|---|
| Size | 35.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62e8c75ae0ec511da2ccad6a82c2be943e88e7eada719a8c7982029b882349bf
|
|
BLAKE2b-256 checksum How to use checksums |
18c32ea358dbc1bac8336dd6a0ef8f3f98c1b3f48c2371aaa3b2e6044fd37330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.13
|
Security for leximpact-socio-fisca-simu-etat 0.1.9
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.