A query engine for any combination of data sources. Query your files and APIs as if they were databases!
Project description
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.9+).
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.
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 Distributions
Built Distributions
File details
Details for the file trustfall-0.2.0-cp313-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp313-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2431da2d7a43b72ea55abc20ce193532aa64d643dc87722b18626efee1a921b |
|
MD5 | 87ed4cc4a5536c929334a8517ddf2788 |
|
BLAKE2b-256 | bbcc2d45b92af3bbfd7aeba0458e49890c402079b6fafe4ff9d14cf391bf136b |
File details
Details for the file trustfall-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 458ca28ff91c6c3d4ef05d77d6ed64763c2bc1292af98642675c25708ac8f7fa |
|
MD5 | fd8c75461eec8165437e834a8a236197 |
|
BLAKE2b-256 | faf79e9c31a2cf30baa55e99fd7bd08073d5319b43651ebd81e2bc14f8975bdc |
File details
Details for the file trustfall-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40cee9dadd278be1260951ecfe89cb6e28501884ad7700d0caa377518c171c34 |
|
MD5 | 045e372705564f303fa7bb38e647c327 |
|
BLAKE2b-256 | 19fa98f7e5e7ae1b3e752878d919578181078c7e32c8126e9799f0a7787e015b |
File details
Details for the file trustfall-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 321ce28341fc30db3ca7bde690e62b028d38f7003331148a48d082b17f273f56 |
|
MD5 | 685b18ddefca6b648698d08509cbe251 |
|
BLAKE2b-256 | f3ad120c248b624cbeaa6e67dbddd545a9815cb8be3c620daf6def835c5861ce |
File details
Details for the file trustfall-0.2.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.13, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bfdb6f4399d14cd9d1d8ae4b35acc5476779c488729adaea0e0c215194a9233 |
|
MD5 | 64d65fd6dee7f06a117d54236c8feba4 |
|
BLAKE2b-256 | b6ccd5f3a9d7910d45be9eb15cd1e1566647a93904e9db717d490438e0081a4b |
File details
Details for the file trustfall-0.2.0-cp312-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp312-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c87cdb12243da9941980ad66c44c1fe139e79ca2e595c48b3b68d1baf292f0 |
|
MD5 | eab69883280a355ca06e5c595f8537af |
|
BLAKE2b-256 | 86cc583a0ba743e32fa4944579711b8f94c5b765d3184749fa5462b6ae79d7c6 |
File details
Details for the file trustfall-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2b8cbf3d082816171782112aeaa59ef8d9952643ff9c75c9c89c4895bbc3bb6 |
|
MD5 | 787420479935efffa999be8e58fc6156 |
|
BLAKE2b-256 | e9c115ffea5ee18720e329deee33421a9b9f8e2b6d09274320502d4cd2ce5681 |
File details
Details for the file trustfall-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6729d25f02bf5173e7a468da871a32d3b03b5cf7670032ae2f6504608fa0e1 |
|
MD5 | 2f1623c43748605d354b01633254d511 |
|
BLAKE2b-256 | 0e43cf19b40e6a51ba7e0ff3aad5ade71637df205c96481272f08ea7287bd36c |
File details
Details for the file trustfall-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cb4fffb981ff7a5371dfa8525935031a8d54af5f85ecc7ae58037319aba94bd |
|
MD5 | a0e2a5d069d1ae9c5e6f67bbb5b70b34 |
|
BLAKE2b-256 | 33fdafcf15b966d5b7e0706a2777d96ca677472c85b6fe9d99d8314512f1621a |
File details
Details for the file trustfall-0.2.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.12, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef5cf5d96ce1875e8d3f27ae946f94b6263d5f98a015f2d7b6b1fbc4c29689b7 |
|
MD5 | c398f56e5fee22ff736962c19303ac6d |
|
BLAKE2b-256 | 21f4b86f92495b2d24e6402f95613e1bb96e4fe240be2fa1c8688ca214e97db0 |
File details
Details for the file trustfall-0.2.0-cp311-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp311-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7209f2212678f3fca0df77b8500d2bc4a536890e6e2a37d86c48b3c4d0959fa2 |
|
MD5 | 13ff8e3de35523c537bc113f412ba363 |
|
BLAKE2b-256 | b23b2f91ac8de7b38ee7e845fa975d50ca5fe88da2eb447e3fb0779706706508 |
File details
Details for the file trustfall-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f1cfcecc9a796e87e323f12d4412403b0436b7e2e753f2e22531b74e9dc463 |
|
MD5 | 99d6fc73df6534214c7ad41e0bac51aa |
|
BLAKE2b-256 | 137330da671e59e44aca7441384bd231459f35888dfb83802a2aa25d0e7ef78d |
File details
Details for the file trustfall-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d26a7f82d9f7559f3feda18780dede78eb982798db2727df9dde9c02388e020 |
|
MD5 | 20b73e2a85ad4c5ba090c3e5c0559f1d |
|
BLAKE2b-256 | c87a176c90360beb5ec2b50d7e531e8925d7e1f29a93f7a852d4c95fef1ab0cb |
File details
Details for the file trustfall-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f6202d22a9dd58946277bea250da4a6d7c602077edb0cc665725b5cd1c2ad70 |
|
MD5 | 63b57a164254e2bc0a7237cd77ba3c18 |
|
BLAKE2b-256 | d73c19c600f43795167649869fab07a5045bc9e59f8128e09763b6e0ffdef8b9 |
File details
Details for the file trustfall-0.2.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.11, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3e5d1eac45f2a33fa74f42716536e307f36f93f4c8868aa85505a0bac3b414 |
|
MD5 | 93d59cf1e4a0942b125152f12bc5c2a1 |
|
BLAKE2b-256 | 1b15858ac645a4f657b80dfcb88891509f73bbf9fee64390bd42a0b519857b31 |
File details
Details for the file trustfall-0.2.0-cp310-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp310-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017cb5a235b9df2b342cf78004585415b4eddc03cbb6d17f9513800b34c112d4 |
|
MD5 | 9d41d5a36cd782f712e2a1cac6b1c0ff |
|
BLAKE2b-256 | 38dd6b88c73174cef7d8938b3bc1b8551378939942ec9a4e759cf7c658cf6775 |
File details
Details for the file trustfall-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bddffc7350e0306cf2fbd3e6823343e437fedf1c048cec2d9771f614dd870c1e |
|
MD5 | e8fb3542226acfa06364865adc55e6ee |
|
BLAKE2b-256 | 097ed1bf2c12c832f3cb742b532154393aa0b98fb3201dc5e5d648dc58e3e706 |
File details
Details for the file trustfall-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b87369430a89155deceeb58b2c0d9fe0aa7a44f35adbfa94926a38f45024681f |
|
MD5 | 49cf84826bad7b07a177b8b5ef069de2 |
|
BLAKE2b-256 | 5dbf916639bb4c7137767d5d8d541fc48f8233673ade5f4df7debf0240a5f425 |
File details
Details for the file trustfall-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4362d68d2960d813bb9b9db92eb7ac8fc117f6eb058fb8795733e37c766d6f78 |
|
MD5 | 53e22a3c26aad15aefb6529882252a4a |
|
BLAKE2b-256 | be53cb48320f01104af629c90f0517095b9960599da313ce1b1e36e979e94a44 |
File details
Details for the file trustfall-0.2.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.10, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a24726fbf23c12c28f383224e37033b05df1c8482417dbc83a8779bb4ee9a811 |
|
MD5 | 75137e4032a4a84b3f2a0692702a6445 |
|
BLAKE2b-256 | ca43310fee5c3fe9f47445fbb3ea792cce772d31658f0435b3dd146637e47cc4 |
File details
Details for the file trustfall-0.2.0-cp39-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp39-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7fb0c8bd6bfca0287098190d65036fcfa7594bd89a1e8ed64fa79b25c2d495f |
|
MD5 | b86ea80b9eb69863d38c27fd1173e948 |
|
BLAKE2b-256 | 7267777cf884179dd33486e920979121057e60486c1b1f6bc5a11e657d04d92e |
File details
Details for the file trustfall-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f18cf7ff9805a8885b5f36c2b2a845ee92785d28f822b5c325d7a05e52a28e8 |
|
MD5 | 304ddf8cabb2f9b347e4ff3265f3326c |
|
BLAKE2b-256 | 88f01c00b647fdef93d84e3a4a4bbe6422605690294766515c749ff135e348d0 |
File details
Details for the file trustfall-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5a2947fdccee2a388026bfa722ac10a0e1e0c4ae53ff5e5dcc2263a0a31287d |
|
MD5 | cc5900148d78c2edb41472eedf7ec9e9 |
|
BLAKE2b-256 | 1ca38ee6f537bc88dfdcf669d85031dbc1ba9130bd7993d10dea8086718c0206 |
File details
Details for the file trustfall-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f0bad1f44fc2c799bd19e95df2c3b7a35df45a72840aceea3b5c0bb3898542b |
|
MD5 | 4cc8795ae6a2443c6ed694d2a8a69fd2 |
|
BLAKE2b-256 | 5f4b593ce0de442c2580b60941cfaca92f8826d078eff2d4d0899848b1bc3a37 |
File details
Details for the file trustfall-0.2.0-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.2.0-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6716243c1b5b5a20f29f8a19382a6c74d47f77a4d48062b0551dfcfb39965631 |
|
MD5 | f6de4a72a638f290d720db766bebd5bc |
|
BLAKE2b-256 | ad5091468e3a4f49d892449c68bf9fe28098b147db41e1f516691426f24af428 |