Skip to main content

Simulation package

Project description

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.

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

leximpact_socio_fisca_simu_etat-0.0.8.tar.gz (184.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file leximpact_socio_fisca_simu_etat-0.0.8.tar.gz.

File metadata

  • Download URL: leximpact_socio_fisca_simu_etat-0.0.8.tar.gz
  • Upload date:
  • Size: 184.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for leximpact_socio_fisca_simu_etat-0.0.8.tar.gz
Algorithm Hash digest
SHA256 be872274352994de446aecefe9381dce54129bb52564c5e0a48f192c337d7f52
MD5 99a9df6e4fa4f0d43ade970507d94c2e
BLAKE2b-256 0c174909dc24f84ceda566ef3b3b8383803728e4f4c6fdbe1322bd35f3a883d8

See more details on using hashes here.

File details

Details for the file leximpact_socio_fisca_simu_etat-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: leximpact_socio_fisca_simu_etat-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for leximpact_socio_fisca_simu_etat-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 62e1a6ff223c7f4814dc4dff18d3b27b7d8185d6980ed640df49b0bb2dcc8f02
MD5 f150b64aa70d61eb45bbdbd451d0709c
BLAKE2b-256 e6ec118e1ea7fac8dccb49e7cdcb291738fef545b3a0b9eb259a2702af4bd9bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page