Skip to main content

fastDeploy python client

Project description

fastDeploy python client

from fdclient import FDClient

client = FDClient('http://localhost:8080') # optional compression=False to disable zstd compression

# infer
response = client.infer([obj_1, obj_2, ...]) # optional unique_id='some_id' to specify a unique id for the request

# infer in background
response_future = client.infer_background([obj_1, obj_2, ...]) # optional unique_id='some_id' to specify a unique id for the request
response = response_future.result() # wait for the response and get it
  • By default fdclient communicates with fastDeploy server via pickles
  • pickle is very useful and makes sense when using fastDeploy server as a micro service internally i.e: all requests to fastDeploy originate from code you have writtem
  • PICKLE is secure if all the inputs to fastDeploy are originating from your code and not direct external user's pickles
  • PICKLE is unsecure if you are passing external user inputs to fastDeploy directly without validation in between
  • start fastDeploy serve with --config "allow_pickle=false" if the fastDeploy APIs are exposed to outside
  • allow_pickle=false config on server side makes fdclient use msgpack if available or json if msgpack not available.

If pickle is unsecure, why use it at all?

  • pickle is great to send or receive arbitary inputs and outputs
  • if allow_pickle=true (default) your inputs and outputs can be any python objects, eg: np arrays, pd dataframes, float32 anything ....
  • pickle is only unsecure if you are unpickling objects pickled by others (since they can insert malicious code)
  • If fastDeploy is being used only for internal microservices, pickle is the best way so enabled by default

Project details


Download files

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

Source Distribution

fdclient-3.0.7.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

fdclient-3.0.7-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file fdclient-3.0.7.tar.gz.

File metadata

  • Download URL: fdclient-3.0.7.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fdclient-3.0.7.tar.gz
Algorithm Hash digest
SHA256 a488f133a94661146b7835ccf438d1200f465d77ca6a2c46de8b3e624b6d00cc
MD5 24682c275c3dce44646d71c5939fed8a
BLAKE2b-256 323cef1984b1c891eb5e6b98fd3f5376ae19bde5ef87d4e447e2822774095dee

See more details on using hashes here.

File details

Details for the file fdclient-3.0.7-py3-none-any.whl.

File metadata

  • Download URL: fdclient-3.0.7-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fdclient-3.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a229d4ee1e80847ef98e866139bf1143239932366b39b5604d9cbdc9e33a7094
MD5 92b2c6a242c23c6e72fa491ae33e4d33
BLAKE2b-256 f766f6b1eaa0a2785848ac16506d557f701088ddb5f3da155a420930ac5435e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page