No project description provided
Project description
Pureinsights Discovery Platform: Sandbox SDK
Discovery Sandbox SDK is a Python package that allows developers to programatically access Discovery features. Currently, it supports executing one or multiple QueryFlow processors.
[!IMPORTANT] The current version of the Discovery Sandbox supports connections to internet-accessible services only. Support for local deployments is planned for an upcoming release.
Requirements
- Python 3.13+
pip
Installation
pip install discovery-sandbox
Testing
Testing is done using the pytest framework. These commands are run from the root folder.
To run the full test suite:
pytest --verbose
To run tests from a single file or directory:
pytest <path_to_test> --verbose
To generate a XML coverage report:
pytest --verbose --cov=. --cov-report xml:coverage.xml
To generate a HTML coverage report:
pytest --cov=. --cov-report html
Implementation
The SDK currently provides classes that represent Discovery entities (Server, Credential, Processor) as well as clients to interact with distinct endpoints. The API requests are made using the httpx library, and serialization is done using the json built-in module.
This client does the following:
- Provides methods to execute standalone QueryFlow processors using
text_to_text/text_to_streamthat return the JSON execution output as a dictionary or text stream respectively. - Supports overloading with the multimethod library to allow the usage of UUIDs instead of full entity objects.
- Supports the execution of a sequence of processors using the
QueryFlowSequenceProcessorandQueryFlowSequenceclasses and theexecutemethod.
Currently, the SDK provides a QueryFlowClient class, that can be instanced with the base url of the QueryFlow instance and an API key.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discovery_sandbox-0.3.0.tar.gz.
File metadata
- Download URL: discovery_sandbox-0.3.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67e426886ecd5306b43ec4693be5313b71a20865242d204cc9d07d3e8cba0c0
|
|
| MD5 |
b6a8ba02f2b3c2b8c8cb29667ebd0c3f
|
|
| BLAKE2b-256 |
2d53ab7a2f51895cc84ce7a95b315816932853557b315f1c553bdfdc542be1aa
|
File details
Details for the file discovery_sandbox-0.3.0-py3-none-any.whl.
File metadata
- Download URL: discovery_sandbox-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e08302c32c377a57f4adbec2f00e272d1b33419fa83108a0a076bb214ab3d185
|
|
| MD5 |
37cfc734303b14461b8fc08dfd846ce8
|
|
| BLAKE2b-256 |
2518401e7c0ec6911a8ba6bf95825a2106e9708bb701e14edd2e77356bd5bb5b
|