{"id":27205,"library":"openfisca-core","title":"OpenFisca-Core","description":"OpenFisca is a versatile microsimulation free software. This is the core engine that compiles and evaluates tax-benefit rules written in Python. Current version: 44.7.0. Released roughly monthly.","status":"active","version":"44.7.0","language":"python","source_language":"en","source_url":"https://github.com/openfisca/openfisca-core","tags":["microsimulation","tax-benefit","policy modeling"],"install":[{"cmd":"pip install openfisca-core","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"SimulationBuilder","correct":"from openfisca_core.simulation_builder import SimulationBuilder"},{"note":"Older versions used 'tracer' singular.","wrong":"from openfisca_core.tracer import Tracer","symbol":"Tracer","correct":"from openfisca_core.tracers import Tracer"},{"note":"","wrong":"","symbol":"Variable","correct":"from openfisca_core.variables import Variable"}],"quickstart":{"code":"from openfisca_core.simulation_builder import SimulationBuilder\nfrom openfisca_core.taxbenefitsystems import TaxBenefitSystem\n\n# Example: load a country package (must be installed separately)\n# Here using openfisca-france as an example\nsystem = TaxBenefitSystem.load('openfisca_france')\nbuilder = SimulationBuilder()\nsimulation = builder.build_from_entities(system, {'personnes': {'individus': [{}]}})\nprint(simulation.calculate('salaire_imposable', period='2023-01'))","lang":"python","description":"Load a tax-benefit system and run a simulation."},"warnings":[{"fix":"call `.item()` on the result for scalar values, or use indexing.","message":"In version 35+ the `simulation.calculate('variable')` now returns a numpy array instead of a float. Use `.item()` for scalar.","severity":"breaking","affected_versions":">=35.0.0"},{"fix":"replace `from openfisca_core.tracer import Tracer` with `from openfisca_core.tracers import Tracer`","message":"The use of `openfisca_core.tracer` (singular) is deprecated; use `openfisca_core.tracers` (plural).","severity":"deprecated","affected_versions":">=34.0.0"},{"fix":"install the relevant country package or define your own taxbenefitsystem.","message":"OpenFisca-Core does not include any country package. You must install a country package separately, e.g., `pip install openfisca-france`.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with: pip install openfisca-core","cause":"You imported 'openfisca_core' but the package is not installed or you used wrong name (e.g., 'openfisca.core').","error":"ModuleNotFoundError: No module named 'openfisca_core'"},{"fix":"Use: `from openfisca_core.simulation_builder import SimulationBuilder`","cause":"You did a `import openfisca_core` and tried `openfisca_core.SimulationBuilder`. Symbols are in submodules.","error":"AttributeError: module 'openfisca_core' has no attribute 'SimulationBuilder'"},{"fix":"Install the correct country package, e.g., pip install openfisca-france","cause":"You tried to load a country package that is not installed.","error":"The module 'openfisca_france' is not installed."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}