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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69949aa5589b6e1673bc562c50c69818a6d9788755ac52b36de77fe00aed14b7
MD5 5b655aa87b9678876e6cb7b1630e9f13
BLAKE2b-256 82a2f5f9aea7b3dba299b46ba3e979872163a70dece7f55a3d5f8ff0867fe6ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 08f774344cd6e78531aa82674798edd9eed17f5f5e76caed2628eaa546ddef80
MD5 14d819aa29cce3c640d3a407544cfcb3
BLAKE2b-256 3fdc8ecadc3fd564bc08c62058a2e7a6c2f4ec7501738425fc8dfabfebc5984e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2a57604b3af6bd58f125c3c15a805a76a0b610dad4303c1632951d7bcc147d3
MD5 69c2cb9724fbbbc0d48e172aafccc79e
BLAKE2b-256 bef486099c086604eaffc1a8c6e6482093976ee4bf368089d5624028e80682dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 714403dec8ca8870adfca1620e26a1eb0cbf4af5d1285d795f4116ec10a25242
MD5 dfefb7002e545b9f99cdf30319650583
BLAKE2b-256 f30ac01e4b9c9d9f11066d16ecf6861b15ab9e6a66c66efb37a5c65ffb14dc63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e45cb8ac7e728f24101794ba2c12584b60c42521d2135535cf10faddeabff146
MD5 f0c50f08ff9513619c2e0a409622807d
BLAKE2b-256 063ea57b09b8034b574017d2140e2db745dd64a2264df3ff8860dee0a57b981e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42371828d3e0e1b963c12565c21d2c93d638ba92c9c7ae611f24fd3ce2c9e697
MD5 363471c56e18f30a102c43ebe0e2c20a
BLAKE2b-256 c111b44a7bb5719fb5dde78b147b414465d6af1d5febb4dc8afe599b7ebf780e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f4ce042e71f47e37bc2bbd5c7670a89fe65b367fe2eadb0325afc53101ccff9
MD5 69124b32254a051a6d56ce6802e7d6cb
BLAKE2b-256 f2fb714b819e2678b2280703ff29634f394f3bd6e96fb853b7fbd8bb3648bed3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastqlapi-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5333a6f71a12cd346201350780d83d3f841fb8d8bcda1a0ec388aae6e9ab39e
MD5 627ad24c2eea3e28f89e5a1eae0e57bd
BLAKE2b-256 64275d00fa87c9161d956735be4efb33aa1a13be799c9d6d39b414b38fb395fb

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