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=falseconfig on server side makes fdclient usemsgpackif available orjsonif 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.0rc5.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fdclient-3.0.0rc5.tar.gz.
File metadata
- Download URL: fdclient-3.0.0rc5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5473ea1e6c98fa585b2eebbe4a2c6dd7e91821ec98da63209bd24686f3f1b6a6
|
|
| MD5 |
81af851140fcf0a8d219ac2d61603a10
|
|
| BLAKE2b-256 |
27c2874b34dd698edff87f18e0c16198ef613fd0eacb25391a5d5c145e99daa2
|
File details
Details for the file fdclient-3.0.0rc5-py3-none-any.whl.
File metadata
- Download URL: fdclient-3.0.0rc5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99e1bf9172b9ded0be48a62de3b1d72ff138e7d0c286f845dff9502764bbd2bd
|
|
| MD5 |
315bdab0aa1bc27c3a617fd775e5e9dd
|
|
| BLAKE2b-256 |
6f93f5c1cd012db6bf62c376f150cc9f96176430d887a1d21d73ff83a03891fa
|