{ "info": { "author": "Dato, Inc.", "author_email": "support@dato.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Information Technology", "Intended Audience :: Other Audience", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "Dato Predictive Service Python Client\n=====================================\n\nThe purpose of the Dato Predictive Service Python Client library is to allow\nPython applications to easily query Dato Predictive Services.\n\nInstallation\n------------\n\nTo install Dato Predictive Service Python Client, simply:\n\n.. code-block:: bash\n\n sudo pip install dato-predictive-service-client\n\nor from source:\n\n.. code-block:: bash\n\n sudo python setup.py install\n\nRequirements\n------------\n\n- Dato Predictive Service, launched by GraphLab-Create >= 1.4 installation\n\nUsage\n-----\n\nCreate Client\n^^^^^^^^^^^^^\n\nTo use the Dato Predictive Service Python Client, first you need to obtain the\nfollowing information from a running Dato Predictive Service:\n\n- Predictive Service CNAME or DNS name (endpoint)\n- API key from the Predictive Service\n\nOnce you have obtained the above information, simply create a new PredictiveServiceClient:\n\n.. code-block:: python\n \n from dato.deploy import PredictiveServiceClient;\n\n client = PredictiveServiceClient(endpoint = ,\n api_key = ,\n should_verify_certificate = )\n\nTo enable SSL certificate verification for this Predictive Service, \nset the ``should_verify_certificate`` to **true**. However, if your Predictive Service\nis launched with a self-signed certificate or without certificate, please \nset ``should_verify_certificate`` to **false**.\n\nThe PredictiveServiceClient can also be created by using a Predictive Service `client configuration file`_.\n\n.. code-block:: python\n\n client = PredictiveServiceClient(config_file = )\n\nQuery\n^^^^^\n\nTo query a model that is deployed on the Predictive Service, you will need:\n\n- model name\n- method to query (recommend, predict, query, etc.)\n- data used to query against the model\n\nFor example, the code below demonstrates how to query a recommender model, named\n``rec``, for recommendations for user ```Jacob Smith```:\n\n.. code:: python\n\n data = {'users': ['Jacob Smith'] }\n result = client.query('rec', method = 'recommend', data = data)\n\n**Notes**\n\n- Different models could support different query methods (recommend, predict, query, etc.)\n and different syntax and format for **data**. You will need to know the\n supported methods and query data format before querying the model.\n\nSet timeout\n^^^^^^^^^^^\n\nTo change the request timeout when querying the Predictive Service, use the following:\n\n.. code:: python\n\n # set timeout to 5 seconds.\n client.set_query_timeout(timeout = 5)\n\nThe default timeout is 10 seconds.\n\nResults\n^^^^^^^\n\nThe output to the ``query()`` function is a dictionary of the query result.\n\nIf query is successful, the query result contains:\n\n- model response\n- uuid for this query\n- version of the model\n\n.. code:: python\n\n model_response = result['response']\n uuid = result['uuid']\n version = result['version']\n\n``model_response`` contains the actual model output from your query.\n\nSend feedback\n^^^^^^^^^^^^^\n\nOnce you get the query result, you can submit feedback data corresponding to this query\nback to the Predictive Service. This feedback data can be used for evaluating your\ncurrent model and training future models.\n\nTo submit feedback data corresponding to a particular query, you will need the UUID\nof the query. The UUID can be easily obtained from the query result.\n\n.. code:: python\n\n uuid = result['uuid']\n\nFor the feedback data, you can use any attributes or value pairs that you like.\n\nExample: \n\n.. code:: python\n\n feedback_data = dict()\n feedback_data['num_of_clicks'] = 3\n feedback_data['searched_terms'] = 'test'\n\nNow we can send this feedback data to the Predictive\nService to associate this feedback with a particular query.\n\n.. code:: python\n\n client.feedback(uuid, feedback_data);\n\nMore Info\n---------\n\nFor more information about the Dato Predictive Service, please read\nthe `API docs`_ and `userguide`_.\n\nLicense\n-------\n\nThe Dato Predictive Service Python Client is provided under the 3-clause BSD `license`_.\n\n\n.. _client configuration file: https://dato.com/products/create/docs/generated/graphlab.deploy.PredictiveService.save_client_config.html\n.. _API docs: https://dato.com/products/create/docs/generated/graphlab.deploy.PredictiveService.html \n.. _userguide: https://dato.com/learn/userguide/deployment/pred-getting-started.html\n.. _license: https://github.com/dato-code/Dato-Predictive-Service-Client-Python/raw/master/LICENSE", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dato-code/Dato-Predictive-Service-Client-Python", "keywords": null, "license": "LICENSE", "maintainer": null, "maintainer_email": null, "name": "dato-predictive-service-client", "package_url": "https://pypi.org/project/dato-predictive-service-client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dato-predictive-service-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dato-code/Dato-Predictive-Service-Client-Python" }, "release_url": "https://pypi.org/project/dato-predictive-service-client/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Dato Predictive Service Client makes it easy to make REST API calls to Dato Predictive Services", "version": "1.0.0" }, "last_serial": 1552429, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "82022f1e0b91aef55b5abc2efbb2960c", "sha256": "47c94452febb5103838e68009f70175010b74ddb075b5599734cfa43df6e0417" }, "downloads": -1, "filename": "dato-predictive-service-client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "82022f1e0b91aef55b5abc2efbb2960c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6486, "upload_time": "2015-05-19T00:12:24", "url": "https://files.pythonhosted.org/packages/29/0b/b4801427924dc27f41c598268d94a9d2738b346f5f1f87803cb10d292228/dato-predictive-service-client-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82022f1e0b91aef55b5abc2efbb2960c", "sha256": "47c94452febb5103838e68009f70175010b74ddb075b5599734cfa43df6e0417" }, "downloads": -1, "filename": "dato-predictive-service-client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "82022f1e0b91aef55b5abc2efbb2960c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6486, "upload_time": "2015-05-19T00:12:24", "url": "https://files.pythonhosted.org/packages/29/0b/b4801427924dc27f41c598268d94a9d2738b346f5f1f87803cb10d292228/dato-predictive-service-client-1.0.0.tar.gz" } ] }