automated.ai python客户端库

automatedai的Python项目详细描述


automated.ai客户端包

访问automated.ai托管算法的python客户端包。有关详细信息,请参见automated.ai

构建python包:

python setup.py bdist_wheelsource py27python setup.py bdist_wheelpython -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

本地安装:

pip install dist/automatedai-0.1-py3-none-any.whl

客户端API的使用方法:

endpointtoken = "my_secret_token"Algo=automatedai.Algorithm(endpoint,token)# Send None to invoke algorithm 
output = Algo.send(None)print(output)# Send a string to your algorithm
output = Algo.send("send a string")print(output)# Send a file 
output = Algo.send(bytearray(open("my_image.jpg", "rb").read()))print(output)# Send a JSON structure, returns the JSON structure 
output = Algo.send({"MyString":"JSON String"})print(output)# Send an dictionary (np arrays are converted to list)output = Algo.send({"int":1,"float":1.2,"array":[1,2],"string":"Ddd","np":np.random.randint(0,255,(100,100,3),np.uint8),"List":[1,2,3,4]})print(output)# Send a list
output = Algo.send(["send", "elements", "in", "array"])print(output)# send a file link to download, returns the file bytes downloaded
output = Algo.send_url_to_download("https://file_linkprint(output)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中ArrayList的超简单问题   Java 8在一段时间后过期   java如何创建具有用户定义维度的矩阵,并使用从上到下、从左到右的递增值填充它?   java从JDBC重启mysql   带有sqlite的java LiveData未更新UI   带有JDialog的java小程序在Mac OSX中未正确隐藏   java ActionListener无法从公共类引用数组?   java Apache Digester:NoSuchMethodException:没有这样的可访问方法   安卓中数据库中的java数据没有以正确的格式检索   java快速排序实现:使用random pivot时几乎排序   安卓 Java:高效的ArrayList过滤?   java如何在单独的文件中制作GUI程序   jasper报告如何从JSP或Java代码在JasperReport中传递参数值?