Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Predictive Services Query Client

Project description

This package allows you to query Turi Predictive Services.

Refer to for detailed information regarding how to use this client.

This package only includes the and from the full Predictive Services client psclient.


In order to connect, you need to know the query endpoint URL and your key. An API key or an admin key is sufficient to query the Predictive Services. An API key may have limitations on which endpoints it can query. Consult with your system administrator to obtain the appropriate key.

The psquery.connect function is used to connect to the service.:

import psquery
conn = psquery.connect(query_endpoint_URL, key_id)

Please consult the connect function documentation for details on alternative methods of specifying these parameters during connection.


Once you have connected, you can query by specifying the endpoint you want to query and the parameters. Keep in mind that your key must have sufficient privileges to access the endpoint. Admin keys can access all endpoints, but API keys must be specifically allowed by endpoint name.:

response = conn.query('add', 1, 2)

The response is a dict with the following keys and values.:

{u'node': u'...', u'uuid': u'...', u'version': 1, u'from_cache': False, u'model': u'add', u'response': 3}

Please see the query method documentation for more details.


If the endpoint allows it, you can specify feedback::['uuid'], success=True)

Please see the feedback method documentation for more details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for psquery, version 2.0
Filename, size File type Python version Upload date Hashes
Filename, size psquery-2.0.tar.gz (10.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page