Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.44 instead.
Reason given by maintainers: Bug

Hotglue SDK for Taps

This is a fork of Melanto's SingerSDK for special use in hotglue, an embedded integration platform for running Singer Taps and Targets.

Taps and targets built on the SDK are automatically compliant with the Singer Spec, the de-facto open source standard for extract and load pipelines.

OAuth Access Token Support

Taps can implement the --access-token CLI flag to refresh OAuth access tokens without running the tap directly.

Implementing Access Token Support

To enable this feature in your tap, override the access_token_support class method to return a tuple of (authenticator_class, auth_endpoint):

from hotglue_singer_sdk import Tap
from my_tap.auth import MyOAuthAuthenticator

class MyTap(Tap):
    name = "tap-myservice"

    @classmethod
    def access_token_support(cls, connector=None):
        """Return the authenticator class and auth endpoint for token refresh.

        Returns:
            A tuple of (authenticator_class, auth_endpoint).
        """
        default_url = "https://api.myservice.com/oauth/token"
        # ommit if token url is not dynamic
        dynamic_url = connector.config.get("auth_url")
        url = dynamic_url or default_url
        return (MyOAuthAuthenticator, url)

Authenticator Requirements

The authenticator class must implement the following methods:

  • is_token_valid() - Returns True if the current access token is still valid
  • update_access_token() - Refreshes the access token and updates the config file

The authenticator will be instantiated with these parameters:

  • stream - A dummy stream object with logger, tap_name, and config attributes
  • config_file - Path to the config file for writing updated tokens
  • auth_endpoint - The OAuth token endpoint URL

Usage

Once implemented, users can refresh the access token using:

tap-myservice --config config.json --access-token

This will output the new access token as JSON:

{
  "access_token": "new_token_value"
}

Note: The --access-token flag requires a config file path. It will not work with --config ENV or when omitting the config.

Download files

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

Source Distribution

hotglue_singer_sdk-1.0.39.tar.gz (112.1 kB view details)

Uploaded Source

Built Distribution

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

hotglue_singer_sdk-1.0.39-py3-none-any.whl (138.7 kB view details)

Uploaded Python 3

File details

Details for the file hotglue_singer_sdk-1.0.39.tar.gz.

File metadata

  • Download URL: hotglue_singer_sdk-1.0.39.tar.gz
  • Upload date:
  • Size: 112.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for hotglue_singer_sdk-1.0.39.tar.gz
Algorithm Hash digest
SHA256 d4de318b0b034bfc9c68206e59ec5b4c5f37ddb1c18e84b72f715aebb020de64
MD5 dcc1084f4d1a3089d15dfc7031af3b60
BLAKE2b-256 3407f3dbd25aba17d1d85cb131256c52786f0c73a478e1d9bddce0c0d38413a4

See more details on using hashes here.

File details

Details for the file hotglue_singer_sdk-1.0.39-py3-none-any.whl.

File metadata

File hashes

Hashes for hotglue_singer_sdk-1.0.39-py3-none-any.whl
Algorithm Hash digest
SHA256 1ebea9cea9e1bc34a1e6aac2eae87979e8023015d49476bb9216aa2380e72748
MD5 84f9e4161fe231ec52d0a61df3c069ae
BLAKE2b-256 131cbbad049a2c5fb7ce0a95ad4c4114cef5dd87e9fcc9be761974e4a7bfadda

See more details on using hashes here.

Supported by

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