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.1.7-cp312-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f3908dd35dc4b5b094919f8e58201048d7f07e09fa1d21692768e8baea6455 |
|
MD5 | 471cc4a2a5fa23a52cb6a2ce85460d12 |
|
BLAKE2b-256 | 607a84cc3e2a9758b5e0399885186e71480b467c38e2af42d494db729d8752eb |
File details
Details for the file trustfall-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe623f19a5265af889a3c1cc97686206703492c832582ce05a9e1d1e28e40a8d |
|
MD5 | 31fb4b6837ae9ff808825292f4a37b4f |
|
BLAKE2b-256 | 69d0863960200fc40ef534b7b98817f78d76d7c05349a8fb5175dce3d3969bf3 |
File details
Details for the file trustfall-0.1.7-cp312-cp312-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 285220daa7d0ceb4bfe7323d2772fc619ed7f3660d10f7710611bbb8d4dd9596 |
|
MD5 | ab09480f3b08f52956e2fddefdb2d3e1 |
|
BLAKE2b-256 | 8c9ab2d7290c4d6bf8d7f697e73e21cc235967f13804cb0058d0abce84623a5f |
File details
Details for the file trustfall-0.1.7-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.0 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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da8f1f9eca430bdff3e9e48429f5d489edd7fe489dfaac0321f79ec3c1d53351 |
|
MD5 | 0a2c41440ad78692624f39d84b633642 |
|
BLAKE2b-256 | 59f8eca5f6c53ddc7e6e3a621c3d964fee19f73dcfe0ce45a402084c9b710431 |
File details
Details for the file trustfall-0.1.7-cp311-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe434ee9f0b576d621c0a079da25f3094678247bf02f0739d32e29407ad9111e |
|
MD5 | c0964c158a536b98ca61fc407bab957a |
|
BLAKE2b-256 | e2b460472c17cdc337d122efc8d649e565b0ae33a29aa81e5877c94f7f57d599 |
File details
Details for the file trustfall-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd45a4491ae9e6a4ce488e29836c7aadfd05347d319a71c45b8f91c09aed781b |
|
MD5 | dbb43b697d4e724262262d62ef55789b |
|
BLAKE2b-256 | c40f413011913b19c452ed34225264504090c6137430cd2e4306df2699ebbd8b |
File details
Details for the file trustfall-0.1.7-cp311-cp311-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db9dd1a907b76b37ee177d119ddf579495c5267099c72b020b7d8e28bab885be |
|
MD5 | 8cc91527412d150b8fe427dfb11fa245 |
|
BLAKE2b-256 | 32d5638a253ae23b860973b8fa501c38ccfbacca37c537e3f8009b3e7afeb800 |
File details
Details for the file trustfall-0.1.7-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.0 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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15cf5b45e00d4715cc5ddce534dfe832d6a9d225c81db4011486598d876b52a1 |
|
MD5 | 5f76be55a4825055d49bc9cfb7665e10 |
|
BLAKE2b-256 | f61c6a550058e38d8dd55ca492bf905333d6cd53ada7f03a41747ee650aacc93 |
File details
Details for the file trustfall-0.1.7-cp310-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57fe3bb8d4d2ec85ea8d19496af72dacb8333cb89e03388a57ca082765cf7e71 |
|
MD5 | c2854c191d4769db3e9c8a100438dd5c |
|
BLAKE2b-256 | e30b7832b09299d286be8e9b2c21b6a9ae0322135b99df182d85fb7450316804 |
File details
Details for the file trustfall-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39b08eb772532bce4324bcc746dc1f3bee60b15828222e8d78b7b21050b26755 |
|
MD5 | 261212dc74fce0b6d7b0817d032f3a0a |
|
BLAKE2b-256 | d069da42c20862be13a485f1b32af748a2f234a2d9c14d58c609d26596ba4a9a |
File details
Details for the file trustfall-0.1.7-cp310-cp310-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31c3569b68f9a889954ccd4007fe4e43fffd01f31b46badd08ce9b7d15e357a0 |
|
MD5 | 714973dcff847965d77ebdf9ece9dea9 |
|
BLAKE2b-256 | 69fcdab2487300bb5c087aeee630dfc5823f4bb432d4ce75277ebee6a8a749a1 |
File details
Details for the file trustfall-0.1.7-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.0 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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e55abc79adfef38c76c54b65d7fcb07e95cab267b58db28c1cba7c337b6dbc9 |
|
MD5 | d87bf56315e331dd40872f4cd84baa06 |
|
BLAKE2b-256 | 08bef76d45a164bbc61aeb796dddc3b651bf1feb2b7f9b696951e78fd7da1112 |
File details
Details for the file trustfall-0.1.7-cp39-none-win_amd64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e580fc15fe9a71d089671d6fc5eaa588dd4d082e1d7c521e8e7d6d2a114f201 |
|
MD5 | f7b4cff74e662b8e5f164e485782a64c |
|
BLAKE2b-256 | a105ce7b4d4230cc88934ac92210f31f2a669f6a564ac8305422cc3fbb591ab8 |
File details
Details for the file trustfall-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 505924443acf5e7d46a7cbbd9f4b2a6e311ac60ef8a94834252053ff846d7c90 |
|
MD5 | 9db8ec289784d57775f09f72242b89b6 |
|
BLAKE2b-256 | c8d5da899dfba825bd1befea77a0e151cc2a091bbe4f98da4f72d4f82d941170 |
File details
Details for the file trustfall-0.1.7-cp39-cp39-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: trustfall-0.1.7-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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f2853255d32a9adfec45596f65c5b43afa07db7901ca689eaa97deac5bb3d79 |
|
MD5 | 95efb06b79591694066a646475312bb7 |
|
BLAKE2b-256 | 0c250dc14b8ae56bf9357e17ae3d65e755b7cf76ba6aa27cc2e5e8c08b27620a |
File details
Details for the file trustfall-0.1.7-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
.
File metadata
- Download URL: trustfall-0.1.7-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.0 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.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec307cb25e987cd8d74e5f2518270f8dd11780ff9a3e468f32161f4e0bbfb09c |
|
MD5 | 1aee5ec330c114b26740c47471360585 |
|
BLAKE2b-256 | 36589a0562b06093500315646e88cb5c734ef4eeea665f7424e7020c9326c2e3 |