Airbyte source connector for Google Directory (Google Workspace Admin Directory API) that extracts users, groups, and group memberships.
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
The primary interface for the Airbyte source connector, providing entry points and connector lifecycle management. This module contains the main classes and functions needed to run the Google Directory connector as an Airbyte source.
The main connector class that extends Airbyte's BaseSource to provide Google Directory-specific functionality.
class SourceGoogleDirectory(BaseSource):
"""
Main connector class for Google Directory integration.
This class extends the Airbyte CDK BaseSource and configures
the connector to use the Google Directory Client.
"""
client_class = ClientThe main entry point for running the connector from command line or programmatically.
def run():
"""
Main entry point function that launches the connector.
Creates a SourceGoogleDirectory instance and launches it using
the Airbyte CDK entrypoint with command-line arguments.
"""from source_google_directory import SourceGoogleDirectory
# Create connector instance
source = SourceGoogleDirectory()
# The connector can be used with Airbyte's launch function
from airbyte_cdk.entrypoint import launch
import sys
launch(source, sys.argv[1:])from source_google_directory.run import run
# Run connector with command-line arguments
run()This will process command-line arguments and execute the appropriate connector operations (spec, check, discover, read).
# Direct import of the main class
from source_google_directory import SourceGoogleDirectory
# This import works because __all__ = ["SourceGoogleDirectory"] in __init__.py
source = SourceGoogleDirectory()The connector integrates with the Airbyte framework through:
The connector responds to standard Airbyte commands:
spec: Returns connection specificationcheck: Validates connection configurationdiscover: Returns available streams (users, groups, group_members)read: Extracts data from Google Directory APIInstall with Tessl CLI
npx tessl i tessl/pypi-airbyte-source-google-directory