vendor_connectors.connectors
VendorConnectors - Public API with caching like TerraformDataSource.
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”VendorConnectors | Public API for vendor connectors with client caching. |
|---|
class vendor_connectors.connectors.VendorConnectors(logger: lifecyclelogging.Logging | None = None, **kwargs)
Section titled “class vendor_connectors.connectors.VendorConnectors(logger: lifecyclelogging.Logging | None = None, **kwargs)”Bases: directed_inputs_class.DirectedInputsClass
Public API for vendor connectors with client caching.
This class provides cached access to all vendor connectors, similar to how TerraformDataSource works in terraform-modules libraries.
Usage: vc = VendorConnectors() slack = vc.get_slack_client(token=”…”, bot_token=”…”) github = vc.get_github_client(github_owner=”org”, github_token=”…”) aws_client = vc.get_aws_client(“s3”)
For Meshy AI, use the functional interface directly: from vendor_connectors.meshy import text3d, image3d, rigging, animate model = text3d.generate(“a medieval sword”)
Meshy does not provide a get_meshy_client() method because it uses a functional interface
rather than a connector class, in order to simplify async operations and usage.
Initialization
Section titled “Initialization”Initializes the DirectedInputsClass with the provided inputs.
Optionally loading additional inputs from environment variables and stdin.
Args: inputs (Mapping[str, Any] | None): Initial inputs to be processed. from_environment (bool): Whether to load inputs from environment variables. from_stdin (bool): Whether to load inputs from stdin. env_prefix (str | None): Optional prefix to filter environment variables. strip_env_prefix (bool): Whether to strip the prefix from environment keys.
_get_cache_key(**kwargs) → frozenset
Section titled “_get_cache_key(**kwargs) → frozenset”Generate a hashable cache key from kwargs.
_get_cached_client(client_type: str, **kwargs) → Any | None
Section titled “_get_cached_client(client_type: str, **kwargs) → Any | None”Retrieve a client from cache.
_set_cached_client(client_type: str, client: Any, **kwargs) → None
Section titled “_set_cached_client(client_type: str, client: Any, **kwargs) → None”Store a client in cache.
get_aws_connector(execution_role_arn: str | None = None) → vendor_connectors.aws.AWSConnector
Section titled “get_aws_connector(execution_role_arn: str | None = None) → vendor_connectors.aws.AWSConnector”Get a cached AWSConnector instance.
Requires: pip install vendor-connectors[aws]
get_aws_client(client_name: str, execution_role_arn: str | None = None, role_session_name: str | None = None, config: botocore.config.Config | None = None, **client_args) → boto3.client
Section titled “get_aws_client(client_name: str, execution_role_arn: str | None = None, role_session_name: str | None = None, config: botocore.config.Config | None = None, **client_args) → boto3.client”Get a cached boto3 client.
get_aws_resource(service_name: str, execution_role_arn: str | None = None, role_session_name: str | None = None, config: botocore.config.Config | None = None, **resource_args) → boto3.resources.base.ServiceResource
Section titled “get_aws_resource(service_name: str, execution_role_arn: str | None = None, role_session_name: str | None = None, config: botocore.config.Config | None = None, **resource_args) → boto3.resources.base.ServiceResource”Get a cached boto3 resource.
get_aws_session(execution_role_arn: str | None = None, role_session_name: str | None = None) → boto3.Session
Section titled “get_aws_session(execution_role_arn: str | None = None, role_session_name: str | None = None) → boto3.Session”Get a cached boto3 session.
get_github_client(github_owner: str | None = None, github_repo: str | None = None, github_branch: str | None = None, github_token: str | None = None) → vendor_connectors.github.GithubConnector
Section titled “get_github_client(github_owner: str | None = None, github_repo: str | None = None, github_branch: str | None = None, github_token: str | None = None) → vendor_connectors.github.GithubConnector”Get a cached GithubConnector instance.
Requires: pip install vendor-connectors[github]
get_google_client(service_account_info: dict[str, Any] | str | None = None, scopes: list[str] | None = None, subject: str | None = None) → vendor_connectors.google.GoogleConnector
Section titled “get_google_client(service_account_info: dict[str, Any] | str | None = None, scopes: list[str] | None = None, subject: str | None = None) → vendor_connectors.google.GoogleConnector”Get a cached GoogleConnector instance.
Requires: pip install vendor-connectors[google]
get_slack_client(token: str | None = None, bot_token: str | None = None) → vendor_connectors.slack.SlackConnector
Section titled “get_slack_client(token: str | None = None, bot_token: str | None = None) → vendor_connectors.slack.SlackConnector”Get a cached SlackConnector instance.
Requires: pip install vendor-connectors[slack]
get_vault_client(vault_url: str | None = None, vault_namespace: str | None = None, vault_token: str | None = None) → hvac.Client
Section titled “get_vault_client(vault_url: str | None = None, vault_namespace: str | None = None, vault_token: str | None = None) → hvac.Client”Get a cached Vault hvac.Client instance.
Requires: pip install vendor-connectors[vault]
get_vault_connector(vault_url: str | None = None, vault_namespace: str | None = None, vault_token: str | None = None) → vendor_connectors.vault.VaultConnector
Section titled “get_vault_connector(vault_url: str | None = None, vault_namespace: str | None = None, vault_token: str | None = None) → vendor_connectors.vault.VaultConnector”Get a cached VaultConnector instance.
Requires: pip install vendor-connectors[vault]
get_zoom_client(client_id: str | None = None, client_secret: str | None = None, account_id: str | None = None) → vendor_connectors.zoom.ZoomConnector
Section titled “get_zoom_client(client_id: str | None = None, client_secret: str | None = None, account_id: str | None = None) → vendor_connectors.zoom.ZoomConnector”Get a cached ZoomConnector instance.