followthemoney-neomodel
Models followthemoney Schemas into neomodel ogm classes
On the fly creation of classes for nodes and edges based on follow the money schema
Classes can be directly imported and used to create objects in a neo4j graph and traverse the graph
Setup
Requires followthemoney and neomodel. Any version of followthemoney will work as
pip install followthemoney-neomodel
This takes any version of followthemoney and will model whatever schemas are defined in that version
Usage
Basic
Just import and use classes directly to create objects
from followthemoney_neomodel import Person, Vehicle
# create two edges based on Person and Vehicle schema
me = Person(name='me')
me.save()
car = Vehicle(name='honda')
car.save()
# connect the two nodes together with edge OWNERSHIP relation and properties
me.owns.connect(car, {'role': 'lease'})
The module also has a models dict that you can use instead of importing to reference all models created
from followthemoney_neomodel import models
me = models['Person'](name='me')
Person.nodes.traverse("owns__name").all()
Async
Want async support? The modeler also sets up matching Async* classes
from followthemoney_neomodel import AsyncPerson
async def main():
me = Person(name='me')
await me.save()
car = Vehicle(name='honda')
await car.save()
await me.owns.connect(car, {'role': 'lease'})
Output
Generates a simple graph
Then you can query the graph using traversal syntax from neomodel
Testing
Run these tests on a dev neo4j instance/database as it will create nodes/edges which can pollute your graph.
Set NEOMODEL_DATABASE_URL env var to define destination db for testing
git clone ...
cd followthemoney-neomodel
poetry install -G dev
poetry run pytest tests.py
Metadata
Release files for followthemoney-neomodel 0.1.0
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 |
|---|---|---|---|---|
| followthemoney_neomodel-0.1.0.tar.gz | 7.6 kB | Without provenance | Details for followthemoney_neomodel-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| followthemoney_neomodel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for followthemoney_neomodel-0.1.0-py3-none-any.whl |
Total release size: 15.8 kB
Release files / followthemoney_neomodel-0.1.0.tar.gz
| Download URL | followthemoney_neomodel-0.1.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0050b0f4119c4f208b3ffc61c472033e698b9e094005e1aaf19e773cfbe6078c
|
|
BLAKE2b-256 checksum How to use checksums |
eb70cf25fd0d68a7c457b5bee067d3f0711b96f0a1a3e47a5ec9820b3fece2c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.10.18 Darwin/25.3.0
|
Release files / followthemoney_neomodel-0.1.0-py3-none-any.whl
| Download URL | followthemoney_neomodel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d502b3613960276b1aca8d2618c8f738d6e6f0f2f5032da3bd281669299e5865
|
|
BLAKE2b-256 checksum How to use checksums |
42c9386b718da8b4c0eb11206360f7b7676f99ada27075c05de0d11ae0940702
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.10.18 Darwin/25.3.0
|
Security for followthemoney-neomodel 0.1.0
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.