Skip to main content

followthemoney query dsl and io helpers

Project description

Docs ftmq on pypi PyPI Downloads PyPI - Python Version Python test and package pre-commit Coverage Status AGPLv3+ License Pydantic v2

ftmq

This library provides methods to query and filter entities formatted as Follow The Money data, either from a json file/stream or using a statement-based store backend from nomenklatura.

It also provides a Query class that can be used in other libraries to work with SQL store queries or api queries.

ftmq is the base layer for investigativedata.io's libraries and applications dealing with Follow The Money data.

To get familiar with the Follow The Money ecosystem, you can have a look at this pad here.

Installation

Minimum Python version: 3.11

pip install ftmq

Usage

Command line

cat entities.ftm.json | ftmq -s Company --country=de --incorporationDate__gte=2023 -o s3://data/entities-filtered.ftm.json

Python Library

from ftmq import Query, smart_read_proxies

q = Query() \
    .where(dataset="ec_meetings", date__lte=2020) \
    .where(schema="Event") \
    .order_by("date", ascending=False)

for proxy in smart_read_proxies("s3://data/entities.ftm.json"):
    if q.apply(proxy):
        yield proxy

Documentation

https://docs.investigraph.dev/lib/ftmq

Support

This project is part of investigraph

In 2023, development of ftmq was supported by Media Tech Lab Bayern batch #3

License and Copyright

ftmq, (C) 2023 Simon Wörpel ftmq, (C) 2024-2025 investigativedata.io ftmq, (C) 2025 Data and Research Center – DARC

ftmq is licensed under the AGPLv3 or later license.

Prior to version 0.8.0, ftmq was released under the MIT license.

see NOTICE and LICENSE

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftmq-4.7.0.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ftmq-4.7.0-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

Details for the file ftmq-4.7.0.tar.gz.

File metadata

  • Download URL: ftmq-4.7.0.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.5 Linux/6.12.74+deb13+1-amd64

File hashes

Hashes for ftmq-4.7.0.tar.gz
Algorithm Hash digest
SHA256 70ee24a33858967e5e74abea50ca5ca7049125a528becba751e32e113d1c04f5
MD5 e7ff40fec4520892ab6041a13d76fc09
BLAKE2b-256 92f8563e536a1755d9526c4acda56efc05f6a5a2ab848c3e0baa81f6b2000ee6

See more details on using hashes here.

File details

Details for the file ftmq-4.7.0-py3-none-any.whl.

File metadata

  • Download URL: ftmq-4.7.0-py3-none-any.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.5 Linux/6.12.74+deb13+1-amd64

File hashes

Hashes for ftmq-4.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12e7f7f3729a57cd47a0f17c922ec2cbef1a86b2b2f2c482307bbefdd65af88c
MD5 43740789588a78cdb0bd2b84856dbc04
BLAKE2b-256 ec9f9b79cfdc5091988a2d7708ce1b1b41bf199f05d2f889a308f6fd76f19c67

See more details on using hashes here.

Supported by

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