{"id":23759,"library":"followthemoney","title":"Follow the Money","description":"A Python library for modeling, validating, and exporting structured anti-corruption data. It provides a schema (the 'Follow the Money' data model) with entities, properties, and relations, along with tools for data import/export (CSV, Excel, JSON, RDF), entity deduplication, and graph analysis. Current version 4.8.1, supports Python >=3.10, released under MIT license. Active development.","status":"active","version":"4.8.1","language":"python","source_language":"en","source_url":"https://github.com/opensanctions/followthemoney","tags":["data-model","anti-corruption","entity-resolution","schema","validation"],"install":[{"cmd":"pip install followthemoney","lang":"bash","label":"Latest stable release"}],"dependencies":[{"reason":"Type mappings and string normalization","package":"pantomime","optional":false},{"reason":"Utility functions (BANAL is a dependency of followthemoney)","package":"banal","optional":false},{"reason":"Country and language codes","package":"pycountry","optional":false},{"reason":"Date parsing","package":"python-dateutil","optional":false},{"reason":"Graph algorithms for deduplication and clustering","package":"networkx","optional":true},{"reason":"Entity deduplication and name matching","package":"nomenklatura","optional":true}],"imports":[{"note":"Model is exposed at package level; the model submodule is internal.","wrong":"from followthemoney.model import Model","symbol":"Model","correct":"from followthemoney import Model"},{"note":"Entity is exposed at package level.","wrong":"from followthemoney.entity import Entity","symbol":"Entity","correct":"from followthemoney import Entity"},{"note":"schema is a module, import as shown.","wrong":"import followthemoney.schema","symbol":"schema","correct":"from followthemoney import schema"}],"quickstart":{"code":"from followthemoney import Model\n\n# Load the default data model\nmodel = Model()\n\n# Create an entity of type 'Person'\nentity = model.make_entity('Person')\nentity.make_id('some-unique-id')\nentity.add('name', 'John Doe')\nentity.add('birthDate', '1980-01-01')\n\n# Validate the entity (raises on invalid)\nentity.validate()\n\n# Export to dict\nprint(entity.to_dict())","lang":"python","description":"Create a Person entity, add properties, validate, and export to dict."},"warnings":[{"fix":"Replace `Entity(model, 'Person')` with `model.make_entity('Person')`.","message":"In version 4.0, the proxy API was removed. Use model.make_entity instead of direct Entity construction.","severity":"breaking","affected_versions":"<4.0"},{"fix":"Run `followthemoney -m` to see current schema, and update code accordingly.","message":"Schema changes between minor versions may rename or remove entity types and properties. Always check migration docs.","severity":"breaking","affected_versions":">=3.0"},{"fix":"Use `copy.deepcopy(entity)` instead of `entity.copy()`.","message":"The `Entity` object is mutable and shares model state; copying entities with `copy()` does a shallow copy of properties. Use deepcopy for full independence.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `python -m followthemoney` instead of `ftm`.","message":"The `followthemoney.cli` namespace and command-line scripts (like `ftm`) are deprecated; use the `followthemoney` module directly.","severity":"deprecated","affected_versions":">=4.5"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from followthemoney import Model` instead of `from followthemoney.model import Model`.","cause":"Importing from submodule incorrectly.","error":"ModuleNotFoundError: No module named 'followthemoney.model'"},{"fix":"Use 'Organization' (US spelling) instead of 'Organisation' (UK spelling).","cause":"Entity type name typo or wrong case. Schema uses 'Organization' (with 'z').","error":"followthemoney.exceptions.InvalidData: Invalid entity type: 'Organisation'"},{"fix":"Use `model.make_entity('Person')` or `from followthemoney import Entity`.","cause":"Trying to access Entity class on Model instance incorrectly.","error":"AttributeError: 'Model' object has no attribute 'Entity'"},{"fix":"Always call `entity.make_id('...')` before adding properties.","cause":"Calling `add()` on Entity before calling `make_id()`.","error":"ValueError: Entity ID is required before adding properties"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}