Skip to main content

An OpenAPI client for the DeltaStream API

Project description

deltastream-connector

A Python client library for DeltaStream - a SQL streaming processing engine based on Apache Flink.

Features

  • Asynchronous API client for DeltaStream
  • Support for SQL statements execution
  • Streaming result sets
  • API Token authentication
  • Python 3.11+ support

Installation

pip install deltastream-connector

Quick Start

import asyncio
from deltastream.api.conn import APIConnection

# Initialize connection with API token
auth_token = os.getenv("DELTASTREAM_AUTH_TOKEN")

if not auth_token:
    raise ValueError("Environment variable 'DELTASTREAM_AUTH_TOKEN' is not set")

# Use the token to construct the DSN and create the connection
dsn = f"https://:{auth_token}@api.deltastream.io/v2"
conn = APIConnection.from_dsn(dsn)

async def main():
    # Execute SQL queries
    rows = await conn.query("SELECT 1;")
    
    # Process results asynchronously
    async for row in rows:
        print(row)

if __name__ == '__main__':
    asyncio.run(main())

Authentication

The connector uses API token authentication. You can obtain an API token from the DeltaStream platform by running CREATE API_TOKEN api_token_name; using the console.

Support

For support, please contact support@deltastream.com or open an issue on our GitHub repository.

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

deltastream_connector-0.1.3.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

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

deltastream_connector-0.1.3-py3-none-any.whl (95.3 kB view details)

Uploaded Python 3

File details

Details for the file deltastream_connector-0.1.3.tar.gz.

File metadata

  • Download URL: deltastream_connector-0.1.3.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for deltastream_connector-0.1.3.tar.gz
Algorithm Hash digest
SHA256 80e465e45dae86f5c88feeff4d2efb16872ca7e45eacebb2d6d736eaac626834
MD5 a5bb138d837e036537fd90447b275143
BLAKE2b-256 9b824a39fa412319779106db46ddf26e344747a0d3321a50a9465ad0a0ea5ff2

See more details on using hashes here.

Provenance

The following attestation bundles were made for deltastream_connector-0.1.3.tar.gz:

Publisher: release.yml on deltastreaminc/deltastream-connector-python

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

File details

Details for the file deltastream_connector-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for deltastream_connector-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d35cea2699248af572d3d651ee548e8b504f47dc05b7dec143beb540684339a
MD5 154711cd5f1079cad9d81233342f2c59
BLAKE2b-256 d6c9e9330cf63a77ec07981602932081403ca51488625ee4d47f9e2d6897bb10

See more details on using hashes here.

Provenance

The following attestation bundles were made for deltastream_connector-0.1.3-py3-none-any.whl:

Publisher: release.yml on deltastreaminc/deltastream-connector-python

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