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.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

fdclient-3.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fdclient-3.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 f9f23a6a8439a3f9b03df464b18e68503f40a460f92b95ead9735096fab87280
MD5 6f221064d62098d9b966cc6af433b37f
BLAKE2b-256 084403e9f66eee33665fb4f604b3d545ecad9cdee51f007c6064e59296581878

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdclient-3.1.1.tar.gz:

Publisher: python_client.yml on notAI-tech/fastDeploy

Attestations:

File details

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

File metadata

  • Download URL: fdclient-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5109a4f80ea75f8d59fed96450ba564290c92b4daa5197da064d5c55ac6879e7
MD5 59e894e716d9bced1baa0a70d826cf20
BLAKE2b-256 a0f1422e40026e684c87f10ce54974b68163574815f6ea98b7a72df10eaf4e65

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdclient-3.1.1-py3-none-any.whl:

Publisher: python_client.yml on notAI-tech/fastDeploy

Attestations:

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