Skip to main content

Predictive Services Query Client (psquery)

This package allows you to query Turi Predictive Services.

Refer to https://turi.com/products/predictive-services/docs/userguide/connecting.html#psquery for detailed information regarding how to use this client.

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

Connecting

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.

Querying

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.

Feedback

If the endpoint allows it, you can specify feedback::

conn.feedback(response['uuid'], success=True)

Please see the feedback method documentation for more details.

Metadata

Release files for psquery 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psquery 2.0
File Size Uploaded Provenance Actions
psquery-2.0.tar.gz 10.3 kB Without provenance Details for psquery-2.0.tar.gz

Release files / psquery-2.0.tar.gz

Download URL psquery-2.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dcfdde3c47129632a68c48fa31a8a8f20976b94ff678a7c2991d36fb955bb0d6
BLAKE2b-256 checksum
How to use checksums
98f30d0b14b593bc5bc9106ee75b1df1e0031d45c0498b7566e4182ed6241ee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for psquery 2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page