Skip to main content

Aparavi Data Toolchain SDK

A Python SDK for interacting with the Aparavi Web Services API. This SDK provides a clean, type-safe interface for validating pipelines, executing tasks, monitoring status, and managing webhooks with the Aparavi platform.


Description

This SDK simplifies integration with Aparavi's data processing pipelines by providing:

  • validate_pipeline: Validates a pipeline structure against Aparavi's backend to ensure it is correctly formed.
  • execute_pipeline: Submits a pipeline for execution on the Aparavi platform.
  • get_pipeline_status: Fetches the current execution status of a pipeline task.
  • teardown_pipeline: Gracefully ends a running pipeline task.
  • send_payload_to_webhook: Sends file(s) to a running webhook-based pipeline.
  • execute_pipeline_workflow: Performs a full end-to-end execution lifecycle for a pipeline.
  • get_version: Fetches the current version of the Aparavi API/backend.

Perfect for data engineers, analysts, and developers building automated data processing workflows.


Setup

  1. Get your credentials:
  • Obtain your API key from the Aparavi console
  • Note your API base URL (e.g. https://eaas.aparavi.com/)
  1. Install package:

    pip install aparavi-dtc-sdk
    
  2. Create .env file:

    Linux/macOS:

    touch .env
    

    Windows:

    type nul > .env
    

Env file

APARAVI_API_KEY=aparavi-dtc-api-key
APARAVI_BASE_URL=https://eaas.aparavi.com/

Quick Start

The Aparavi SDK supports a simplified, one-step method for executing pipelines. This method performs validation, execution, monitoring, and teardown in a single call:

import os

from dotenv import load_dotenv
from aparavi_dtc_sdk import AparaviClient

load_dotenv()

client = AparaviClient(
    base_url=os.getenv("APARAVI_BASE_URL"),
    api_key=os.getenv("APARAVI_API_KEY")
)

result = client.execute_pipeline_workflow(
    pipeline="./pipeline_config.json",
    file_glob="./*.png"
)

print(result)

NOTE: While we continue to evolve the SDK to support more flexible and modular pipeline workflows, the single-function call approach (execute_pipeline_workflow) will remain fully supported for the foreseeable future. This ensures backward compatibility and allows existing integrations to continue working without any changes.

Pre Built Pipelines

Available pre-built pipeline configurations:

  • AUDIO_AND_SUMMARY: Processes audio content and produces both a transcription and a concise summary.
  • SIMPLE_AUDIO_TRANSCRIBE: Processes audio files and returns transcriptions of spoken content.
  • SIMPLE_PARSER: Extracts and processes metadata and content from uploaded documents.
import os

from dotenv import load_dotenv
from aparavi_dtc_sdk import AparaviClient, PredefinedPipelines # Import PredefinedPipelines enum

load_dotenv()

client = AparaviClient(
    base_url=os.getenv("APARAVI_BASE_URL"),
    api_key=os.getenv("APARAVI_API_KEY")
)

result = client.execute_pipeline_workflow(
    pipeline=PredefinedPipelines.SIMPLE_AUDIO_TRANSCRIBE, # Specify PredefinedPipelines
    file_glob="./audio/*.mp3"
)

print(result)

Power user quick start

import json
import os

from dotenv import load_dotenv
from aparavi_dtc_sdk import AparaviClient

load_dotenv()

client = AparaviClient(
    base_url=os.getenv("APARAVI_BASE_URL"),
    api_key=os.getenv("APARAVI_API_KEY")
)

try:
    validation_result = client.validate_pipeline("pipeline_config.json")
except Exception as e:
    print(f"Validation failed: {e}")

try:
    start_result = client.execute_pipeline(pipeline_config, name="my-task")
    if start_result.status == "OK":
        token = start_result.data["token"]
        task_type = start_result.data["type"]

        status_result = client.get_pipeline_status(token=token, task_type=task_type)

        end_result = client.teardown_pipeline(token=token, task_type=task_type)

except Exception as e:
    print(f"Task operation failed: {e}")

NOTE: We will soon sunset the multi-step pipeline execution process in favor of a simplified, single-method call that improves usability and reduces boilerplate code. The above pattern—using separate calls to validate_pipeline, execute_pipeline, get_pipeline_status, and teardown_pipeline—will no longer be supported in future SDK versions.


Development

Setting up for development

# Install in development mode
pip install -e ".[dev]"

# Find package Install
pip list | grep aparavi

# Show package info
pip show aparavi-dtc-sdk

# Run linting
flake8 aparavi-dtc-sdk/
black aparavi-dtc-sdk/
mypy aparavi-dtc-sdk/

Running Tests

pytest tests/

Support

For problems and questions, please open an issue on the GitHub repository.


Authors

Joshua D. Phillips
github.com/joshuadarron

Contributions welcome — feel free to submit a PR or open an issue!

Metadata

Release files for aparavi-dtc-sdk 1.1.1

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

Source distribution (sdist)

Source distribution for aparavi-dtc-sdk 1.1.1
File Size Uploaded Provenance Actions
aparavi_dtc_sdk-1.1.1.tar.gz 14.8 kB Without provenance Details for aparavi_dtc_sdk-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aparavi-dtc-sdk 1.1.1
File Interpreter ABI Platform Actions
aparavi_dtc_sdk-1.1.1-py3-none-any.whl Python 3 none any Details for aparavi_dtc_sdk-1.1.1-py3-none-any.whl

Total release size: 29.9 kB

Release files / aparavi_dtc_sdk-1.1.1.tar.gz

Download URL aparavi_dtc_sdk-1.1.1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
daeb1f38d324c7f17387b454f4a2b218e661bb234e5a56db010d19c8bed51d46
BLAKE2b-256 checksum
How to use checksums
d380bee9deb8d6cac47231dec38347ee3245d32c642f2384f386ac69f6ceaf14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / aparavi_dtc_sdk-1.1.1-py3-none-any.whl

Download URL aparavi_dtc_sdk-1.1.1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
714234d8f2ea0132a52506b5d897c8b3ca5fb89b1aa4fc6c9fe3c411e2cfed80
BLAKE2b-256 checksum
How to use checksums
43085dcf81f208266c809a4547ae3250c2edae425d02992e579932b2442a9c59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for aparavi-dtc-sdk 1.1.1

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