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.1.0.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file fdclient-3.1.0.tar.gz
.
File metadata
- Download URL: fdclient-3.1.0.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32509d90cdef0cdbdad9e45a0f5b4c315f0e5d3861e7cc5c20674e3b80182c7b |
|
MD5 | 2e1b18b497b4647c95ee5504431f6536 |
|
BLAKE2b-256 | 38ff7ea989ec4d2135bcb0a3724484c7b7f3501b7132da8959afc1fa0ed06bc2 |
Provenance
The following attestation bundles were made for fdclient-3.1.0.tar.gz
:
Publisher:
python_client.yml
on notAI-tech/fastDeploy
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
fdclient-3.1.0.tar.gz
- Subject digest:
32509d90cdef0cdbdad9e45a0f5b4c315f0e5d3861e7cc5c20674e3b80182c7b
- Sigstore transparency entry: 147523372
- Sigstore integration time:
- Predicate type:
File details
Details for the file fdclient-3.1.0-py3-none-any.whl
.
File metadata
- Download URL: fdclient-3.1.0-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2fc1fc56d80b63a1ff354b74f723d2271c54519873b8ae4b5a33040a0776f72 |
|
MD5 | a20fd39365e66ce34a70d2f70209696d |
|
BLAKE2b-256 | eccbfb2c922fca4d2462d2fac6bdf2b889f10ad5d005b0eca0709653c8d12097 |
Provenance
The following attestation bundles were made for fdclient-3.1.0-py3-none-any.whl
:
Publisher:
python_client.yml
on notAI-tech/fastDeploy
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
fdclient-3.1.0-py3-none-any.whl
- Subject digest:
f2fc1fc56d80b63a1ff354b74f723d2271c54519873b8ae4b5a33040a0776f72
- Sigstore transparency entry: 147523373
- Sigstore integration time:
- Predicate type: