Skip to main content

Python SDK for Uniphore Flow Platform APIs

Project description

Flow Platform SDK

Python SDK for interacting with Uniphore Flow Platform services via async RPC.

Usage

import asyncio
from flow_platform_sdk import platform_api

async def main():
    # List data connectors
    connectors = await platform_api.list_connectors()

    # Execute SQL query
    result = await platform_api.execute_query(
        connector_id="conn_123",
        sql_query="SELECT * FROM customers LIMIT 10",
        max_rows=10
    )

    # Query knowledge base
    answer = await platform_api.query_knowledge_base(
        knowledge_base_id="kb_123",
        query="What is the revenue?"
    )

asyncio.run(main())

API Reference

Data Connectors

# List all connectors
await platform_api.list_connectors()

# Get schema
await platform_api.get_schema(connector_id="conn_123")

# Execute query
await platform_api.execute_query(
    connector_id="conn_123",
    sql_query="SELECT * FROM table",
    max_rows=1000
)

# Discover schema
await platform_api.discover_schema(
    connector_id="conn_123",
    include_sample_data=True,
    table_filter="customer*"
)

# Get table info
await platform_api.get_table_info(
    connector_id="conn_123",
    table_name="customers"
)

# Get sample data
await platform_api.get_sample_data(
    connector_id="conn_123",
    table_name="customers",
    limit=5
)

Knowledge Base

# List knowledge bases
await platform_api.list_knowledge_bases()

# Query knowledge base
await platform_api.query_knowledge_base(
    knowledge_base_id="kb_123",
    query="What are the main features?"
)

Agent Evaluation

# Invoke agent with draft skill
result = await platform_api.invoke_agent(
    agent_spec_id="agent_123",
    draft_skill_id="draft_456",
    input_message="What is the weather today?",
    context={"location": "San Francisco"},
    timeout=60
)

Architecture

The SDK uses stdio-based RPC for communication with backend services:

  • Requests sent to stdout: REMOTE_SERVICE_CALL:{...}
  • Responses read from stdin: REMOTE_TOOL_RESULT:{...}

Designed for sandboxed execution environments.

Configuration

  • Default timeout: 120 seconds per request
  • Daemon threads for clean exit on timeout

Development

# Setup
uv sync

# Format code
uvx ruff format .
uvx ruff check .

Project details


Download files

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

Source Distribution

flow_platform_sdk-1.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flow_platform_sdk-1.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file flow_platform_sdk-1.1.0.tar.gz.

File metadata

  • Download URL: flow_platform_sdk-1.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flow_platform_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 44a6972e9b282c35d99fabe554640091c08b1f950af65d5fbf075d938e1bd22d
MD5 8141525f0e6aa30642174ead7e2b4df5
BLAKE2b-256 3d18acd510cc60c3dc7231c4d3635cfb51ceaeb015a54bcbe816037a3fbeeb30

See more details on using hashes here.

Provenance

The following attestation bundles were made for flow_platform_sdk-1.1.0.tar.gz:

Publisher: sdk-release.yml on uniphore/flow-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flow_platform_sdk-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flow_platform_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 937c5637419610748e5a3a6f96dea2ca691d8487d754e523a67946b6f67d48f5
MD5 7757623dd531498b1df32268cba1475a
BLAKE2b-256 5b5b2c5f2f543a8f814a097f5aedd23d1c68b396c4ae18bfba4b8240ebdd9ce7

See more details on using hashes here.

Provenance

The following attestation bundles were made for flow_platform_sdk-1.1.0-py3-none-any.whl:

Publisher: sdk-release.yml on uniphore/flow-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page