{"id":24158,"library":"openfisca-france","title":"OpenFisca France","description":"OpenFisca Rules as Code model for France. It simulates the French tax-benefit system. Current version: 175.0.40, requires Python >=3.9. Released continuously.","status":"active","version":"175.0.40","language":"python","source_language":"en","source_url":"https://github.com/openfisca/openfisca-france","tags":["openfisca","france","tax-benefit","simulation","rules-as-code"],"install":[{"cmd":"pip install openfisca-france","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core engine for OpenFisca","package":"openfisca-core","optional":false}],"imports":[{"note":"Use underscore, not dot","wrong":"from openfisca.france import FranceTaxBenefitSystem","symbol":"FranceTaxBenefitSystem","correct":"from openfisca_france import FranceTaxBenefitSystem"},{"note":"","wrong":"","symbol":"Individu","correct":"from openfisca_france.entities import Individu"},{"note":"","wrong":"","symbol":"Famille","correct":"from openfisca_france.entities import Famille"},{"note":"","wrong":"","symbol":"Menage","correct":"from openfisca_france.entities import Menage"}],"quickstart":{"code":"from openfisca_france import FranceTaxBenefitSystem\nfrom openfisca_core.simulation_builder import SimulationBuilder\n\n# Create the tax-benefit system\ntbs = FranceTaxBenefitSystem()\n\n# Create a simulation for a single person\nbuilder = SimulationBuilder()\nsimulation = builder.build_from_entities(tbs, {\n    'individus': ['person1'],\n    'familles': ['famille1'],\n    'menages': ['menage1'],\n})\nsimulation.set_input('age', '2026-01-01', {'person1': 30})\nsimulation.set_input('salaire_de_base', '2026-01', {'person1': 2000})\nsimulation.calculate('revenu_disponible', '2026-01')","lang":"python","description":"Simulate the monthly disposable income of a single person earning 2000 EUR/month."},"warnings":[{"fix":"Update variable names to current ones as per the changelog. Use `openfisca_france.variables` to list available variables.","message":"Version 6.0.0 introduced a major refactoring of variable names and entities. Old variable names (e.g., 'salaire_net', 'impots_directs') are deprecated or removed.","severity":"breaking","affected_versions":"<6.0.0"},{"fix":"Upgrade Python to 3.9 or higher.","message":"Python 3.9 is the minimum; support for Python 3.8 was dropped in version 5.0.0.","severity":"deprecated","affected_versions":"<5.0.0"},{"fix":"Always specify entities as a dict: {'individus': [...], 'familles': [...], 'menages': [...]}. Do not rely on automatic detection.","message":"The simulation builder now requires explicit entity mapping; using `SimulationBuilder` incorrectly can lead to entity mismatches.","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install openfisca-france. Then import as: from openfisca_france import FranceTaxBenefitSystem","cause":"Package not installed or imported with wrong syntax.","error":"ModuleNotFoundError: No module named 'openfisca_france'"},{"fix":"Use 'individus' (with 's') as key, and provide a list of person IDs.","cause":"Incorrect entity key in simulation builder.","error":"KeyError: 'individus'"},{"fix":"Ensure all required inputs (like income, age) are set before calculating.","cause":"Simulation object is None because builder.build_from_entities failed (e.g., missing input).","error":"AttributeError: 'NoneType' object has no attribute 'calculate'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}