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.9-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.9-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.9-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.9-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.9-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.9-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.9-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.9-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.9-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastqlapi-0.2.9-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 62c75372027404e4f054d8fb7ede1a90315cda5017858182bf08d10bd0d8a85a
MD5 5877926b2514331f9c09ec5f7fc30eb1
BLAKE2b-256 51536eef45d9dc5c5946a851ee25c9c7229a07e1871cf3edb252386272f7b1a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a91da2dcc4e423c73e6ce1f9f24859b148442356a976242da6995800cec525c8
MD5 c6083316da26954226fe7eae583539b0
BLAKE2b-256 ac8c765ebf2ac93320aa7a21c4de78e7abb3a479d74ae03cb16c1974f323a94e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ac69f1c09bd3f5946c818993403ca8e82fae18dbc26ab9c2f05a6fe959bd277
MD5 18aa0fb48c25374d0e0b096b5562abe8
BLAKE2b-256 f79c7ccf8f42e10ae4cfbe82066e9dc5e2f4f316a4d10ce1811d3c2727f02edb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75946ea315195ab0bec373cb081f83d5452fbbca3516ea35bc76759c2630cb54
MD5 500708cc1e5b58cd16de081d835f2547
BLAKE2b-256 bdd1b7512b4eb3014b1acbfebe5c22710a6c2d1bd44cc7b80faf9e66d9eeee7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3e293f53d7fee3d41922eaeca7bf2dd9f3d5adef4393155383ab020b06bc252
MD5 b1ba2c5b17fa0f6737287d4f99c919d3
BLAKE2b-256 d0409b1d653b767a3feab4ef7d7b73cf9b6806248369daab1bdf3c8af561683d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a2209dbd4b2f84a9c14ead5c89c064333a28e872c06e62f7d1bd1c0df50451b
MD5 c4af26d827866ed17cda0752a87630d3
BLAKE2b-256 ab1bc5b5e75f64650503e55a5ac5a3691ecc8d99e5244b2b1b0e9fc311008393

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a35c5f44d8cc1a3ab912615a668ce3316eaf3821df12a827e34bdf8fd2853cd
MD5 672fa43893d1d19fb54020248ca78744
BLAKE2b-256 2d770df8c7900fc3069b5717e231f1b9bc34cfbeb3cef9a04978455fc1738f73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7fa3ab647210da34399eba6f9cfeafbbdbae26b9bf0e3526a14c78478fc8d14
MD5 34befeaffca12d462a59f0660f2244ec
BLAKE2b-256 b9a8ac9abbbf9e764457a677f60f1ed258b5e1bf19891d885ae4b16ce5d1b890

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