Skip to main content

trustfall — Python bindings

Use the Trustfall query engine from Python.

API

Create a schema object:

from trustfall import Schema

my_schema = Schema(
    """
    Your schema text here, written in GraphQL SDL.

    See an example schema here:
    https://github.com/obi1kenobi/trustfall/blob/main/pytrustfall/numbers.graphql
    """
)

Create an adapter with which to query the schema:

from typing import Any, Dict

from trustfall import Adapter

# Choose the type that is used to represent data vertices:
Vertex = Dict[str, Any]

class MyAdapter(Adapter[Vertex]):
    # Implement the four abstract methods from Adapter.
    ...

Execute queries:

from trustfall import execute_query

my_adapter = MyAdapter(...)

my_query = """
query {
    # your query here
}
"""
args = {
    # query arguments here
}

results_iterator = execute_query(
    my_adapter,
    my_schema,
    my_query,
    args,
)
for result in results_iterator:
    print(result)

Installing trustfall

This package is a wrapper around the Trustfall query engine, which is written in Rust.

Wheels are available for Windows, macOS (both x86 and ARM), and Linux (manylinux), for each supported version of CPython (3.10+).

This package should work on other platforms as well, in which case its Rust components may need to be compiled from source as part of the installation process.

If you get errors while installing this package, please report your OS and architecture info in an issue.

Metadata

Release files for trustfall 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for trustfall 0.3.2
File
trustfall-0.3.2-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details
trustfall-0.3.2-cp315-cp315-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 Linux musl 1.2+ x86-64 Details
trustfall-0.3.2-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.17+ x86-64 Details
trustfall-0.3.2-cp315-cp315-macosx_11_0_arm64.whl CPython 3.15 CPython 3.15 macOS 11.0+ ARM64 Details
trustfall-0.3.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
trustfall-0.3.2-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details
trustfall-0.3.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
trustfall-0.3.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
trustfall-0.3.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
trustfall-0.3.2-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
trustfall-0.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
trustfall-0.3.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
trustfall-0.3.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
trustfall-0.3.2-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
trustfall-0.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
trustfall-0.3.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
trustfall-0.3.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
trustfall-0.3.2-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details
trustfall-0.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
trustfall-0.3.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
trustfall-0.3.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
trustfall-0.3.2-cp310-cp310-musllinux_1_2_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.2+ x86-64 Details
trustfall-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
trustfall-0.3.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 36.1 MB

Release files / trustfall-0.3.2-cp315-cp315-win_amd64.whl

Download URL trustfall-0.3.2-cp315-cp315-win_amd64.whl
Size 1.4 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
7df6b7c4b6b6e68b4954e1a5f37aafa9c0e40afa9b2dbb83317a7c320e48e5ec
BLAKE2b-256 checksum
How to use checksums
734c17aa4d4fbe761c68a405b224ef9cb6e6aa917157a0cf68fc905ceb9b1a49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp315-cp315-musllinux_1_2_x86_64.whl

Download URL trustfall-0.3.2-cp315-cp315-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
5a66c3c23768247585394cdda966e51048b27246a72dc4970d7df12389d313db
BLAKE2b-256 checksum
How to use checksums
fc8b246db649873f45cc9cdd4879740107969b01fd83f285637de46af666e883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL trustfall-0.3.2-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.15 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
84709fa9c1c6a18a820f4765f765e602c5f8f29a2549a501022f6ccc94348be9
BLAKE2b-256 checksum
How to use checksums
ae051b190ee322872e6d177a7c8c338cdfd2ccfb71e2989d059714a7541e06a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp315-cp315-macosx_11_0_arm64.whl

Download URL trustfall-0.3.2-cp315-cp315-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.15 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
50c4ce6609a8d0a932f6ffbb9e290e76954a798082250227fee2f0ec64895796
BLAKE2b-256 checksum
How to use checksums
68e851038d059b5b2bda18495ec897ae3e732f8272d8e7d51b588449e97762b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp314-cp314-win_amd64.whl

Download URL trustfall-0.3.2-cp314-cp314-win_amd64.whl
Size 1.4 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
96b9c5da8abc338b880a2ef63b51943d80316ca3027eddbdd6809651342b01c4
BLAKE2b-256 checksum
How to use checksums
845f57a2426a2ca7960b2f72510825e8ed07f081b744f96364f232611bf4f670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL trustfall-0.3.2-cp314-cp314-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
a398d85bc4fa3b699f588a4f4c9cad29fb73614592fc1fc0b957a4fb988f95fa
BLAKE2b-256 checksum
How to use checksums
4ac3f8c8cc56f9bab93252770f294a832db70b318cc1dd85e65ab1ae8f1c544d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL trustfall-0.3.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c28471483de00fd4b120541c9e8291e6ca8550b9a3cfb7c0edc460c93f92c7ce
BLAKE2b-256 checksum
How to use checksums
dc86e823f01e8c8d4be399cff90025c710749eb062d212b891a060d64d77df81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL trustfall-0.3.2-cp314-cp314-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
eccd579a376c6a19aca9e8901801c988ec1c2e14f29dc0b47c43b1f87df69648
BLAKE2b-256 checksum
How to use checksums
4a3f6d5f839827b0a26cc0b36fce57bfbbdae2a45c9d16004080e3d7f9aeb777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp313-cp313-win_amd64.whl

Download URL trustfall-0.3.2-cp313-cp313-win_amd64.whl
Size 1.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
698e42a9c0394f57d188afe97039f0e8094be559fc235172b7e740240ed38d24
BLAKE2b-256 checksum
How to use checksums
65b7b7df461fdddaaa684e13ab97c416db8f2a7262a8c83bc0e6a380ddd01750
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL trustfall-0.3.2-cp313-cp313-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
4c3fc5ee5e6b2472268e5012c67d05c32b37fccc214233bca213c6915bf5b06c
BLAKE2b-256 checksum
How to use checksums
d42c9dc68cd0c85b260b2c9b37e175eca512e076203b41e392f2654b5f31f0a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL trustfall-0.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7bd8fdda70804ad5cccd42566b47a5a96a92566c206246db6af3b923f5b90df3
BLAKE2b-256 checksum
How to use checksums
c136bee5db8fedcfd99c027fb3d0fe981ff33779984a2d29fea136d87dfcdb95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL trustfall-0.3.2-cp313-cp313-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
54427868c4e4a977b8524a8d13bcec9ae2ee7d72e3080f19b889bad30323d91e
BLAKE2b-256 checksum
How to use checksums
e800dee7109c4dd427121f8a9d0ea218479bcbf004dcb9116296bfcb82b42a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp312-cp312-win_amd64.whl

Download URL trustfall-0.3.2-cp312-cp312-win_amd64.whl
Size 1.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c1148707ff1c82cbed40396147905af73b816789b643cb440557980c248bf2b8
BLAKE2b-256 checksum
How to use checksums
db3bf303acbf6143ecd6dd15f26e5f5a1082d6d998262245954c98525d59c093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL trustfall-0.3.2-cp312-cp312-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
c58b65e7b43e7fb40616160a8ca36a44671fa2a18112bbab5770c2295ba37583
BLAKE2b-256 checksum
How to use checksums
121ad9c0eef093d63e705dd4f918eeb915e9f3787f7d8fe36461c3292623cbdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL trustfall-0.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a1d78a1e0f94cdf59d553bcdceefce172a690e482da5311159afbcf3a62409ef
BLAKE2b-256 checksum
How to use checksums
e9b626bd90096a2645595e901d41d55fd4f67accc029fa029c671cfd678a81e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL trustfall-0.3.2-cp312-cp312-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cf4604ab5d06f92b52df048e3e29b415fcf36bcb10638564d72ebdcb2c801421
BLAKE2b-256 checksum
How to use checksums
c23aeb9ec832927d65eb868f3cd8190c511e033f69f51eef966b7d8df23d50f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp311-cp311-win_amd64.whl

Download URL trustfall-0.3.2-cp311-cp311-win_amd64.whl
Size 1.4 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2833d83aaef4664d327bea5e541f3ec298b519ce4aa8638a415512ec6f996e3a
BLAKE2b-256 checksum
How to use checksums
2dbaa400520996517bc5a05080e4b6cf95f739e2fb3a5a1e48eab715b2420edb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL trustfall-0.3.2-cp311-cp311-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
23afbc9c7d04a2a135ad3f5b88558161247372bad5dd240a085425dbd7a26512
BLAKE2b-256 checksum
How to use checksums
0794b14964f4ac631b2f8464df5eda3ab730b76df3015794e1e1cc469c2da1f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL trustfall-0.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ff0dcf9f3301f65e22eba72862861bb767853571e16fb3bb7d3d681247e6d198
BLAKE2b-256 checksum
How to use checksums
f194ae5f7a49c34ced1778561a1ce090888458c964096d13c5a513ef251654cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL trustfall-0.3.2-cp311-cp311-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
28331fa92be0f6def9ac995e37124ea81b8ce250d33cf7be8bc134ef7a617620
BLAKE2b-256 checksum
How to use checksums
f3f697d5d8d0c6907c759e968e89a45cb9ecd0b5371cd22779ece7293871527d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp310-cp310-win_amd64.whl

Download URL trustfall-0.3.2-cp310-cp310-win_amd64.whl
Size 1.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
7003e2c1e9879879016264df81d7c30fd9f7ebebeae2cf71b62063cf9cb38436
BLAKE2b-256 checksum
How to use checksums
d3c3e794e89e51ec053ad4bc3590171d9b4fefddc04e5754fe0a03998ad64b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp310-cp310-musllinux_1_2_x86_64.whl

Download URL trustfall-0.3.2-cp310-cp310-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
e391c64df8e5c7e17adf3619e171447a76d48c82f14e0871b918531e3561768c
BLAKE2b-256 checksum
How to use checksums
756002902727ee152b3ff7463b633c95358729c5560de4257876c2463f3d58a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL trustfall-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
faae87b3c9f8906cb8b7218ab25ccddb6a9fccd8bad5c814de6e2014d1cce17d
BLAKE2b-256 checksum
How to use checksums
6d06440654a7e54670ff0839473f8e0df27fc4bef9221f999e13544ff6c7fd45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trustfall-0.3.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL trustfall-0.3.2-cp310-cp310-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
14482d6c65271677f354c62837eb28f348326bb99934240b6469bd573f48fbc5
BLAKE2b-256 checksum
How to use checksums
65072843d4a6bdf06bbe4f605864768e2fb91a625394d6e54d9b4b89a4821152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.3.2 This release

24 release files

0.3.0

6 release files

0.2.1

25 release files

0.1.5

13 release files

0.1.3

13 release files

0.1.2

13 release files

0.1.1

9 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page