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.2.0.tar.gz (59.7 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.2.0-py3-none-any.whl (97.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deltastream_connector-0.2.0.tar.gz
  • Upload date:
  • Size: 59.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 f53467f6c719ac6a1cff2e3420d725a08f7d06ef40d618125587c9be54893879
MD5 c3b29bf099639e973768fdece66cd6f0
BLAKE2b-256 042d78714a343b1ead7b5a8ffb1de2917bbf7334c0dc783a28fc9b26a176ed5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for deltastream_connector-0.2.0.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deltastream_connector-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df03befb547079b038a5a98aa99e9b272dc46043867f78b3df554d91cf1e5ed5
MD5 d8841f65efe20b45edd3e5d32c027047
BLAKE2b-256 6f5c0eeef3a7623bb1fb8084eaaec7676837cfc8256eaa6266b326467151dd44

See more details on using hashes here.

Provenance

The following attestation bundles were made for deltastream_connector-0.2.0-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