/airbyte-oss-python

A python SDK for accessing the airbyte-oss-python API.

Primary LanguagePythonMIT LicenseMIT

airbyte-oss

SDK Installation

pip install git+https://github.com/speakeasy-sdks/airbyte-oss-python.git

SDK Example Usage

import airbyte
from airbyte.models import shared

s = airbyte.Airbyte()

req = shared.SaveStatsRequestBody(
    attempt_number=548814,
    job_id=592845,
    stats=shared.AttemptStats(
        bytes_emitted=715190,
        estimated_bytes=844266,
        estimated_records=602763,
        records_committed=857946,
        records_emitted=544883,
        state_messages_emitted=847252,
    ),
    stream_stats=[
        shared.AttemptStreamStats(
            stats=shared.AttemptStats(
                bytes_emitted=623564,
                estimated_bytes=645894,
                estimated_records=384382,
                records_committed=437587,
                records_emitted=297534,
                state_messages_emitted=891773,
            ),
            stream_name='ipsa',
            stream_namespace='delectus',
        ),
        shared.AttemptStreamStats(
            stats=shared.AttemptStats(
                bytes_emitted=272656,
                estimated_bytes=383441,
                estimated_records=477665,
                records_committed=791725,
                records_emitted=812169,
                state_messages_emitted=528895,
            ),
            stream_name='iusto',
            stream_namespace='excepturi',
        ),
    ],
)

res = s.attempt.save_stats(req)

if res.internal_operation_result is not None:
    # handle response

Available Resources and Operations

  • complete_destination_o_auth - Given a destination def ID generate an access/refresh token etc.
  • get_destination_o_auth_consent - Given a destination connector definition ID, return the URL to the consent screen where to redirect the user to.
  • set_instancewide_destination_oauth_params - Sets instancewide variables to be used for the oauth flow when creating this destination. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with consistent variables e.g: the company's Google Ads developer_token, client_id, and client_secret without the user having to know about these variables.
  • complete_source_o_auth - Given a source def ID generate an access/refresh token etc.
  • get_source_o_auth_consent - Given a source connector definition ID, return the URL to the consent screen where to redirect the user to.
  • set_instancewide_source_oauth_params - Sets instancewide variables to be used for the oauth flow when creating this source. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with consistent variables e.g: the company's Google Ads developer_token, client_id, and client_secret without the user having to know about these variables.

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !

SDK Created by Speakeasy