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 usemsgpack
if available orjson
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
Release history Release notifications | RSS feed
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.8.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file fdclient-3.0.8.tar.gz
.
File metadata
- Download URL: fdclient-3.0.8.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fba4ff6391209c77aa5c0d52d75edc16c21d2de0d51c112395b54b286ef7d718 |
|
MD5 | 027914c65c3620c4fb55112b841eb2d8 |
|
BLAKE2b-256 | d70843db21d8330ec71f442599d67f63e7659c8de08b07c23dcb9ea50360b895 |
File details
Details for the file fdclient-3.0.8-py3-none-any.whl
.
File metadata
- Download URL: fdclient-3.0.8-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e258144c3206d1a860d096cf68e866e51f68acf0aba852cfcc7d6287324c995d |
|
MD5 | ad23db778cea9c3039beaa6f8750bfaa |
|
BLAKE2b-256 | 305b9cd022d6598e97d4cccc69f06bc0dc808bc76df2352209c1a59eb913e866 |