Classes Reference

Plugin Classes

Tap

Abstract base class for taps.

Target

Abstract base class for targets.

InlineMapper

Abstract base class for inline mappers.

sql.SQLTap

A specialized Tap for extracting from SQL streams.

sql.SQLTarget

Target implementation for SQL destinations.

Stream Classes

Stream

Abstract base class for tap streams.

RESTStream

Abstract base class for REST API streams.

GraphQLStream

Abstract base class for API-type streams.

sql.SQLStream

Base class for SQLAlchemy-based streams.

Sink Classes

Sink

Abstract base class for target sinks.

RecordSink

Base class for singleton record writers.

BatchSink

Base class for batched record writers.

sql.SQLSink

SQL-type sink type.

SQL Connector for SQL Taps and Targets

sql.SQLConnector

Base class for SQLAlchemy-based connectors.

Authenticator Classes

authenticators.APIAuthenticatorBase

Base class for offloading API auth.

authenticators.APIKeyAuthenticator

Implements API key authentication for REST Streams.

authenticators.BasicAuthenticator

Implements basic authentication for REST Streams.

authenticators.BearerTokenAuthenticator

Implements bearer token authentication for REST Streams.

authenticators.OAuthAuthenticator

API Authenticator for OAuth 2.0 flows.

authenticators.OAuthJWTAuthenticator

API Authenticator for OAuth 2.0 flows which utilize a JWT refresh token.

authenticators.SimpleAuthenticator

DEPRECATED: Please use a more specific authenticator.

Exception Types

exceptions.ConfigValidationError

Raised when a user's config settings fail validation.

exceptions.FatalAPIError

Exception raised when a failed request should not be considered retriable.

exceptions.InvalidStreamSortException

Exception to raise if sorting errors are found while syncing the records.

exceptions.MapExpressionError

Failed map expression evaluation.

exceptions.MaxRecordsLimitException

Exception indicating the sync aborted due to too many records.

exceptions.RecordsWithoutSchemaException

Raised if a target receives RECORD messages prior to a SCHEMA message.

exceptions.RetriableAPIError

Exception raised when a failed request can be safely retried.

exceptions.StreamMapConfigError

Raised when a stream map has an invalid configuration.

exceptions.TapStreamConnectionFailure

Exception to raise when stream connection fails or stream is disconnected.

exceptions.TooManyRecordsException

Exception to raise when query returns more records than max_records.

exceptions.DiscoveryError

Raised when a schema discovery error occurs.

exceptions.InvalidReplicationKeyException

Exception to raise if the replication key is not in the stream properties.

exceptions.RequestedAbortException

Base class for abort and interrupt requests.

exceptions.AbortedSyncExceptionBase

Base exception to raise when a stream sync is aborted.

exceptions.AbortedSyncFailedException

Exception to raise when sync is aborted and unable to reach a stable state.

exceptions.AbortedSyncPausedException

Exception to raise when an aborted sync operation is paused successfully.

exceptions.ConformedNameClashException

Raised when name conforming produces clashes.

exceptions.MissingKeyPropertiesError

Raised when a received (and/or transformed) record is missing key properties.

exceptions.InvalidJSONSchema

Raised when a JSON schema is invalid.

exceptions.InvalidRecord

Raised when a stream record is invalid according to its declared schema.

JSON Schema builder classes

typing.PropertiesList

Properties list.

typing.ArrayType

Array type.

typing.BooleanType

Boolean type.

typing.Constant

A constant property.

typing.CustomType

Accepts an arbitrary JSON Schema dictionary.

typing.DateTimeType

DateTime type.

typing.DateType

Date type.

typing.DecimalType

Decimal type.

typing.DiscriminatedUnion

A discriminator property.

typing.DurationType

Duration type.

typing.EmailType

Email type.

typing.HostnameType

Hostname type.

typing.IntegerType

Integer type.

typing.IPv4Type

IPv4 address type.

typing.IPv6Type

IPv6 type.

typing.JSONPointerType

JSONPointer type.

typing.ObjectType

Object type, which wraps one or more named properties.

typing.OneOf

OneOf type.

typing.Property

Generic Property.

typing.RegexType

Regex type.

typing.RelativeJSONPointerType

RelativeJSONPointer type.

typing.StringType

String type.

typing.TimeType

Time type.

typing.URITemplateType

URITemplate type.

typing.URIType

URI type.

typing.UUIDType

UUID type.

Pagination

pagination.BaseAPIPaginator

An API paginator object.

pagination.SinglePagePaginator

A paginator that works with single-page endpoints.

pagination.BaseHATEOASPaginator

Paginator class for APIs supporting HATEOAS links in their response bodies.

pagination.HeaderLinkPaginator

Paginator class for APIs supporting HATEOAS links in their headers.

pagination.JSONPathPaginator

Paginator class for APIs returning a pagination token in the response body.

pagination.SimpleHeaderPaginator

Paginator class for APIs returning a pagination token in the response headers.

pagination.BasePageNumberPaginator

Paginator class for APIs that use page number.

pagination.BaseOffsetPaginator

Paginator class for APIs that use page offset.

pagination.LegacyPaginatedStreamProtocol

Protocol for legacy paginated streams classes.

pagination.LegacyStreamPaginator

Paginator that works with REST streams as they exist today.

Batch Encoding

batch.BaseBatcher

Base Record Batcher.

batch.Batcher

Determines batch type and then serializes batches to that format.

Schema Sources

schema.source.SchemaSource

Abstract base class for schema sources.

schema.source.SchemaDirectory

Schema source for local file-based schemas.

schema.source.StreamSchema

Stream schema descriptor.

schema.source.OpenAPISchema

Schema source for OpenAPI specifications.

Testing

Test Runners

testing.runners.SingerTestRunner

Base Singer Test Runner.

testing.runners.TapTestRunner

Utility class to simplify tap testing.

testing.runners.TargetTestRunner

Utility class to simplify target testing.

Factory Functions

testing.factory.get_tap_test_class(tap_class, *)

Get Tap Test Class.

testing.factory.get_target_test_class(...[, ...])

Get Target Test Class.

Test Configuration

testing.config.SuiteConfig

Test Suite Config, passed to each test.

Standard Tap Tests

testing.tap_tests.TapCLIPrintsTest

Test that the tap is able to print standard metadata.

testing.tap_tests.TapDiscoveryTest

Test that discovery mode generates a valid tap catalog.

testing.tap_tests.TapStreamConnectionTest

Test that the tap can connect to each stream.

testing.tap_tests.TapValidFinalStateTest

Test that the final state is a valid catalog.

testing.tap_tests.StreamSchemaIsValidTest

Test that a stream's schema is valid.

testing.tap_tests.StreamReturnsRecordTest

Test that a stream sync returns at least 1 record.

testing.tap_tests.StreamCatalogSchemaMatchesRecordTest

Test all attributes in the catalog schema are present in the record schema.

testing.tap_tests.StreamRecordMatchesStreamSchema

Test all attributes in the record schema are present in the catalog schema.

testing.tap_tests.StreamRecordSchemaMatchesCatalogTest

Test all attributes in the record schema are present in the catalog schema.

testing.tap_tests.StreamPrimaryKeysTest

Test all records for a stream's primary key are unique and non-null.

testing.tap_tests.AttributeIsBooleanTest

Test an attribute is of boolean datatype (or can be cast to it).

testing.tap_tests.AttributeIsDateTimeTest

Test a given attribute contains unique values (ignores null values).

testing.tap_tests.AttributeIsIntegerTest

Test that a given attribute can be converted to an integer type.

testing.tap_tests.AttributeIsNumberTest

Test that a given attribute can be converted to a floating point number type.

testing.tap_tests.AttributeIsObjectTest

Test that a given attribute is an object type.

testing.tap_tests.AttributeNotNullTest

Test that a given attribute does not contain any null values.

Standard Target Tests

testing.target_tests.TargetCliPrintsTest

Test Target correctly prints version and about information.

testing.target_tests.TargetArrayData

Test Target handles array data.

testing.target_tests.TargetCamelcaseTest

Test Target handles CaMeLcAsE record key and attributes.

testing.target_tests.TargetCamelcaseComplexSchema

Test Target handles CaMeLcAsE record key and attributes, nested.

testing.target_tests.TargetDuplicateRecords

Test Target handles duplicate records.

testing.target_tests.TargetEncodedStringData

Test Target handles encoded string data.

testing.target_tests.TargetInvalidSchemaTest

Test Target handles an invalid schema message.

testing.target_tests.TargetMultipleStateMessages

Test Target correctly relays multiple received State messages (checkpoints).

testing.target_tests.TargetNoPrimaryKeys

Test Target handles records without primary keys.

testing.target_tests.TargetOptionalAttributes

Test Target handles optional record attributes.

testing.target_tests.TargetPrimaryKeyUpdates

Test Target handles Primary Key updates.

testing.target_tests.TargetRecordBeforeSchemaTest

Test Target handles records arriving before schema.

testing.target_tests.TargetRecordMissingKeyProperty

Test Target handles record missing key property.

testing.target_tests.TargetRecordMissingOptionalFields

Test Target handles record missing optional fields.

testing.target_tests.TargetSchemaNoProperties

Test Target handles schema with no properties.

testing.target_tests.TargetSchemaUpdates

Test Target handles schema updates.

testing.target_tests.TargetSpecialCharsInAttributes

Test Target handles special chars in attributes.

Test Templates

testing.templates.TestTemplate

Each Test class requires one or more of the following arguments.

testing.templates.TapTestTemplate

Base Tap test template.

testing.templates.TargetTestTemplate

Base Target test template.

testing.templates.StreamTestTemplate

Base Tap Stream test template.

testing.templates.AttributeTestTemplate

Base Tap Stream Attribute template.

Test Suites

testing.suites.SingerTestSuite

Test Suite container class.

Singer Specification Types

Message Types

singerlib.messages.Message

Singer base message.

singerlib.messages.RecordMessage

Singer record message.

singerlib.messages.SchemaMessage

Singer schema message.

singerlib.messages.StateMessage

Singer state message.

singerlib.messages.ActivateVersionMessage

Singer activate version message.

singerlib.messages.SingerMessageType

Singer specification message types.

Catalog Types

singerlib.catalog.Catalog

Singer catalog mapping of stream entries.

singerlib.catalog.CatalogEntry

Singer catalog entry.

singerlib.catalog.Metadata

Base stream or property metadata.

singerlib.catalog.MetadataMapping

Stream metadata mapping.

singerlib.catalog.StreamMetadata

Stream metadata.

singerlib.catalog.SelectionMask

Boolean mask for property selection in schemas and records.

Schema Utilities

singerlib.schema.Schema

Object model for JSON Schema.

singerlib.schema.resolve_schema_references(schema)

Resolves and replaces json-schema $refs with the appropriate dict.

Message Utilities

singerlib.messages.exclude_null_dict(pairs)

Exclude null values from a dictionary.

singerlib.messages.format_message(message)

Format a message as a JSON string.

singerlib.messages.write_message(message)

Write a message to stdout.

Contributed Modules

Filesystem Components

contrib.filesystem.stream.FileStream

Abstract base class for file streams.

contrib.filesystem.tap.FolderTap

Singer tap for files in a directory.

Batch Encoders

Helper Utilities

Capabilities

helpers.capabilities.CapabilitiesEnum

Base capabilities enumeration.

helpers.capabilities.PluginCapabilities

Core capabilities which can be supported by taps and targets.

helpers.capabilities.TapCapabilities

Tap-specific capabilities.

helpers.capabilities.TargetCapabilities

Target-specific capabilities.

helpers.capabilities.TargetLoadMethods

Target-specific capabilities.

JSONPath

helpers.jsonpath.extract_jsonpath(...)

Extract records from an input based on a JSONPath expression.

Plugin Information

About Classes

about.AboutInfo

About information for a plugin.

about.AboutFormatter

Abstract base class for about formatters.

about.JSONFormatter

About formatter for JSON output.

about.MarkdownFormatter

About formatter for Markdown output.

Metrics Classes

metrics.Point

An individual metric measurement.

metrics.Metric

Common metric types.

metrics.Tag

Constants for commonly used tags.

metrics.Status

Constants for commonly used status values.

Other

sql.connector.SQLToJSONSchema

SQLAlchemy to JSON Schema type mapping helper.

sql.connector.JSONSchemaToSQL

A configurable mapper for converting JSON Schema types to SQLAlchemy types.