## fastDeploy python client
```python
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
Raw data
{
"_id": null,
"home_page": "https://github.com/notAI-tech/fastDeploy",
"name": "fdclient",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6.0",
"maintainer_email": null,
"keywords": null,
"author": "BEDAPUDI PRANEETH",
"author_email": "praneeth@bpraneeth.com",
"download_url": "https://files.pythonhosted.org/packages/08/44/03e9f66eee33665fb4f604b3d545ecad9cdee51f007c6064e59296581878/fdclient-3.1.1.tar.gz",
"platform": null,
"description": "\n## fastDeploy python client\n\n```python\nfrom fdclient import FDClient\n\nclient = FDClient('http://localhost:8080') # optional compression=False to disable zstd compression\n\n# infer\nresponse = client.infer([obj_1, obj_2, ...]) # optional unique_id='some_id' to specify a unique id for the request\n\n# infer in background\nresponse_future = client.infer_background([obj_1, obj_2, ...]) # optional unique_id='some_id' to specify a unique id for the request\nresponse = response_future.result() # wait for the response and get it\n```\n\n- By default fdclient communicates with fastDeploy server via pickles\n- 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\n- ***PICKLE is secure if all the inputs to fastDeploy are originating from your code and not direct external user's pickles***\n- ***PICKLE is unsecure if you are passing external user inputs to fastDeploy directly without validation in between***\n- start fastDeploy serve with `--config \"allow_pickle=false\"` if the fastDeploy APIs are exposed to outside\n- `allow_pickle=false` config on server side makes fdclient use `msgpack` if available or `json` if msgpack not available.\n\n#### If pickle is unsecure, why use it at all?\n\n- pickle is great to send or receive arbitary inputs and outputs\n- if `allow_pickle=true` (default) your inputs and outputs can be any python objects, eg: np arrays, pd dataframes, float32 anything ....\n- pickle is only unsecure if you are unpickling objects pickled by others (since they can insert malicious code)\n- If fastDeploy is being used only for internal microservices, pickle is the best way so enabled by default\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "fastDeploy python client",
"version": "3.1.1",
"project_urls": {
"Homepage": "https://github.com/notAI-tech/fastDeploy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a0f1422e40026e684c87f10ce54974b68163574815f6ea98b7a72df10eaf4e65",
"md5": "59e894e716d9bced1baa0a70d826cf20",
"sha256": "5109a4f80ea75f8d59fed96450ba564290c92b4daa5197da064d5c55ac6879e7"
},
"downloads": -1,
"filename": "fdclient-3.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "59e894e716d9bced1baa0a70d826cf20",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.0",
"size": 3572,
"upload_time": "2024-11-11T06:34:03",
"upload_time_iso_8601": "2024-11-11T06:34:03.815849Z",
"url": "https://files.pythonhosted.org/packages/a0/f1/422e40026e684c87f10ce54974b68163574815f6ea98b7a72df10eaf4e65/fdclient-3.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "084403e9f66eee33665fb4f604b3d545ecad9cdee51f007c6064e59296581878",
"md5": "6f221064d62098d9b966cc6af433b37f",
"sha256": "f9f23a6a8439a3f9b03df464b18e68503f40a460f92b95ead9735096fab87280"
},
"downloads": -1,
"filename": "fdclient-3.1.1.tar.gz",
"has_sig": false,
"md5_digest": "6f221064d62098d9b966cc6af433b37f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.0",
"size": 4529,
"upload_time": "2024-11-11T06:34:05",
"upload_time_iso_8601": "2024-11-11T06:34:05.822493Z",
"url": "https://files.pythonhosted.org/packages/08/44/03e9f66eee33665fb4f604b3d545ecad9cdee51f007c6064e59296581878/fdclient-3.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 06:34:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "notAI-tech",
"github_project": "fastDeploy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fdclient"
}