Skip to main content

No project description provided

Project description

FastQL Inference Server

Spin up a blazing fast rust GraphQL server around your ML model in one line of python code.

NB. This is currently prototype only, not suitable for production. Can only create flat / non nested schema. Make sure you set RUST_ENV to production if you are using it on a remote machine

How to:

pip install fastqlapi

Visit localhost:8000/graphiql for the graphql playground UI or make a request to localhost:8000

example:

from fastqlapi import fastql_server
def test(**kwargs):
    print (kwargs['input'])
    return {
        'output': "test response",
    }

fastql_server.start(callback=test, args={"input": { "type": "String", "description": "this is my input field"}}, fields={"output": { "type": "String"}})

to try with an example schema:

from fastqlapi import fastql_server, test_args, test_fields

def test(**kwargs):
    print (kwargs['prompt'])
    return {
        "tokens": ["example", "tokens"],
    }

fastql_server.start(callback=test, args=testargs, fields=testfields)

FastQL implements all the basic GraphQL types and array types, including required types but not currently required subtypes (an element of a list).

Under the hood FastQL uses the actix rust web server which is currently no.7 fastest web framework according to https://www.techempower.com/benchmarks/#section=data-r21. By comparison, python's FastAPI is no.279. I've observed about a 2x speed up across the example schema here vs a FastAPI/Ariadne python GraphQL server with the same schema.

Environment variables

GRAPHQL_HOST Default localhost

GRAPHQL_PORT Default 8000

RUST_LOG Rust log level | default 'debug'

RUST_BACKTRACE Add rust backtrace to log | default 1

RUST_QUIET No rust logs | default false

TRACING Turn on Apollo tracing | default false

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

fastqlapi-0.2.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

fastqlapi-0.2.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file fastqlapi-0.2.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a94317145687475351f13981adc04617be82413f5e4946000b44b30b76602af0
MD5 4e14bdb2f2822846d21e7af17b4b9928
BLAKE2b-256 dc6707d0eb79345e9e984b03040d335952a058189ec09a6f59b0664e3bf6d45e

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07aeaa5d75f7a45b43db3db37475ed88e6a2fb42451f9cf57591956c911fc51e
MD5 e4de48e72f7fcf6db83e231ee3eee2f9
BLAKE2b-256 62f41ac1633ac65faee2dc099115ce22c70c8c2938e0ebbe63910657469cf0fa

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff7ca40670f877934e607fdade8d1f3d95f015cf05466cc6fd4ebfefbff2c703
MD5 da41782a6910205a43a24b2570403afd
BLAKE2b-256 00805a73faf82f2e392203ad1cc081d446628b466d1402572abe260ff2ed4a68

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60768792ffb5923278e33b9d071b62989f954ff3b90936a82cae3502bfacd50a
MD5 24f705f4c4407cf5b6a0fe405ce076d8
BLAKE2b-256 5af6be04852e5d1fc7235623f9095b75f79c17867830f2520adad002c0366679

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 279c7abf64d49079e5311c6ec5d51a1066213027b244b0dc1ed498da69ef8ab5
MD5 7b8517b3f8136479a91730700853a846
BLAKE2b-256 808045486fc4bf21929cd0fe41169aca959c17ef099d77fbcb2146c851e05378

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a29f6c5df4912c95a3f0b869b6209ba6016c467e0de36374e83cb3885cdc9246
MD5 28251704357d19933ed778539fb5c88f
BLAKE2b-256 b27980ca4f2628e9dc3f5b634205877dabd88a84d3ad650879c7daf1f377f308

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8973cadcf63213e7e9e780fdbc1358612f4ffe5164b313da13271b287d3ed6a7
MD5 926c8953457d9ee87da8db3465bd8b13
BLAKE2b-256 d33ad1088d9b2bbd787bfaae7d1f02abe727f29100c409d998091faba01fd05d

See more details on using hashes here.

File details

Details for the file fastqlapi-0.2.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 103744794523a5c129d37f110dd00d4ae50e42fea429066484eedc22f806e79e
MD5 cef26c34055e2864daef6a8d0ab12de1
BLAKE2b-256 a9b9095107a9dd66bc1de67f5f7c2f8b779e16a47456c35a05690afd5172b728

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